Browse Source

nettest: update comment on MakePipe

To warn about the provided stop function should not be nil.

Change-Id: I73351b6379ae22e85298ce9e87ee80077f748c7e
Reviewed-on: https://go-review.googlesource.com/34091
TryBot-Result: Gobot Gobot <gobot@golang.org>
Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com>
Reviewed-by: Joe Tsai <thebrokentoaster@gmail.com>
Mikio Hara 9 years ago
parent
commit
9773060888
1 changed files with 1 additions and 1 deletions
  1. 1 1
      nettest/conntest.go

+ 1 - 1
nettest/conntest.go

@@ -25,7 +25,7 @@ var (
 // MakePipe creates a connection between two endpoints and returns the pair
 // as c1 and c2, such that anything written to c1 is read by c2 and vice-versa.
 // The stop function closes all resources, including c1, c2, and the underlying
-// net.Listener (if there is one).
+// net.Listener (if there is one), and should not be nil.
 type MakePipe func() (c1, c2 net.Conn, stop func(), err error)
 
 // TestConn tests that a net.Conn implementation properly satisfies the interface.