1
0
Fork 0

Add new TCP NameAddress type

master
Philip O'Toole 3 years ago
parent e5a8a209e0
commit 5e11584c90

@ -0,0 +1,17 @@
package tcp
// NameAddress wraps a string and implements the
// net.Listener interface.
type NameAddress struct {
Address string
}
// Network returns the network type. Always returns "tcp".
func (n NameAddress) Network() string {
return "tcp"
}
// String returns the address.
func (n NameAddress) String() string {
return n.Address
}
Loading…
Cancel
Save