diff options
author | Christopher Speller <crspeller@gmail.com> | 2016-05-12 15:08:58 -0400 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2016-05-12 16:37:29 -0400 |
commit | 84d2482ddbff9564c9ad75b2d30af66e3ddfd44d (patch) | |
tree | 8bfa567d2b6381f4a996ada2deff8a16aa85a3ac /Godeps/_workspace/src/github.com/braintree/manners/test_helpers/listener.go | |
parent | d1efb66ad7b017f0fbfe6f0c20843b30f396e504 (diff) | |
download | chat-84d2482ddbff9564c9ad75b2d30af66e3ddfd44d.tar.gz chat-84d2482ddbff9564c9ad75b2d30af66e3ddfd44d.tar.bz2 chat-84d2482ddbff9564c9ad75b2d30af66e3ddfd44d.zip |
Updating go depencancies. Switching to go1.6 vendoring (#2949)
Diffstat (limited to 'Godeps/_workspace/src/github.com/braintree/manners/test_helpers/listener.go')
-rw-r--r-- | Godeps/_workspace/src/github.com/braintree/manners/test_helpers/listener.go | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/Godeps/_workspace/src/github.com/braintree/manners/test_helpers/listener.go b/Godeps/_workspace/src/github.com/braintree/manners/test_helpers/listener.go deleted file mode 100644 index e3af35a6e..000000000 --- a/Godeps/_workspace/src/github.com/braintree/manners/test_helpers/listener.go +++ /dev/null @@ -1,34 +0,0 @@ -package test_helpers - -import ( - "errors" - "net" -) - -type Listener struct { - AcceptRelease chan bool - CloseCalled chan bool -} - -func NewListener() *Listener { - return &Listener{ - make(chan bool, 1), - make(chan bool, 1), - } -} - -func (l *Listener) Addr() net.Addr { - addr, _ := net.ResolveTCPAddr("tcp", "127.0.0.1:8080") - return addr -} - -func (l *Listener) Close() error { - l.CloseCalled <- true - l.AcceptRelease <- true - return nil -} - -func (l *Listener) Accept() (net.Conn, error) { - <-l.AcceptRelease - return nil, errors.New("connection closed") -} |