github.com/graybobo/golang.org-package-offline-cache@v0.0.0-20200626051047-6608995c132f/x/net/ipv4/mocktransponder_test.go (about)

     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  
     5  package ipv4_test
     6  
     7  import (
     8  	"net"
     9  	"testing"
    10  )
    11  
    12  func acceptor(t *testing.T, ln net.Listener, done chan<- bool) {
    13  	defer func() { done <- true }()
    14  
    15  	c, err := ln.Accept()
    16  	if err != nil {
    17  		t.Error(err)
    18  		return
    19  	}
    20  	c.Close()
    21  }