Commit c4d4e0a2 authored by Emil Hessman's avatar Emil Hessman

communicator/ssh: bind variable value to closure

Fixes the following vet report:

communicator/ssh/communicator_test.go:88: range variable newChannel captured by func literal
parent 952ae516
...@@ -83,10 +83,10 @@ func newMockLineServer(t *testing.T) string { ...@@ -83,10 +83,10 @@ func newMockLineServer(t *testing.T) string {
} }
t.Log("Accepted channel") t.Log("Accepted channel")
go func() { go func(channelType string) {
defer channel.Close() defer channel.Close()
conn.OpenChannel(newChannel.ChannelType(), nil) conn.OpenChannel(channelType, nil)
}() }(newChannel.ChannelType())
} }
conn.Close() conn.Close()
}() }()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment