mocktransponder_test.go 389 B

123456789101112131415161718192021
  1. // Copyright 2012 The Go Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style
  3. // license that can be found in the LICENSE file.
  4. package ipv4_test
  5. import (
  6. "net"
  7. "testing"
  8. )
  9. func acceptor(t *testing.T, ln net.Listener, done chan<- bool) {
  10. defer func() { done <- true }()
  11. c, err := ln.Accept()
  12. if err != nil {
  13. t.Error(err)
  14. return
  15. }
  16. c.Close()
  17. }