Go's net.Listener
interface looks like this:
type Listener interface {
// Accept waits for and returns the next connection to the listener.
Accept() (Conn, error)
// Close closes the listener.
// Any blocked Accept operations will be unblocked and return errors.
Close() error
// Addr returns the listener's network address.
Addr() Addr
}
But what is the Addr
actually used for? If I had to implement my own Listener that just returned an empty Addr().String()
but accepted and closed connections just fine, what implications would that have?