github.com/orange-cloudfoundry/cli@v7.1.0+incompatible/util/clissh/listener_factory.go (about)

     1  package clissh
     2  
     3  import "net"
     4  
     5  //go:generate counterfeiter . ListenerFactory
     6  
     7  type ListenerFactory interface {
     8  	Listen(network, address string) (net.Listener, error)
     9  }
    10  
    11  type listenerFactory struct{}
    12  
    13  func DefaultListenerFactory() listenerFactory {
    14  	return listenerFactory{}
    15  }
    16  
    17  func (listenerFactory) Listen(network, address string) (net.Listener, error) {
    18  	return net.Listen(network, address)
    19  }