FedP2P/string-addr.go

12 lines
282 B
Go

package torrent
import "net"
// This adds a net.Addr interface to a string address that has no presumed Network.
type StringAddr string
var _ net.Addr = StringAddr("")
func (StringAddr) Network() string { return "" }
func (me StringAddr) String() string { return string(me) }