diff --git a/lang/channel/singal.go b/lang/channel/singal.go index 561c20f5..4c539afa 100644 --- a/lang/channel/singal.go +++ b/lang/channel/singal.go @@ -16,7 +16,7 @@ type Signal interface { type SignalOption func(c *sigal) -func WithSinalTimeout(timeout time.Duration) SignalOption { +func WithSignalTimeout(timeout time.Duration) SignalOption { return func(s *sigal) { s.timeout = timeout } diff --git a/lang/channel/singal_test.go b/lang/channel/singal_test.go index 1612bf38..1892291c 100644 --- a/lang/channel/singal_test.go +++ b/lang/channel/singal_test.go @@ -35,7 +35,7 @@ func TestSignal(t *testing.T) { } func TestSignalTimeout(t *testing.T) { - sg := NewSignal(WithSinalTimeout(time.Millisecond * 200)) + sg := NewSignal(WithSignalTimeout(time.Millisecond * 200)) go func() { time.Sleep(time.Millisecond * 500) sg.Signal()