FedP2P/string-addr.go

12 lines
282 B
Go
Raw Permalink Normal View History

2023-04-03 13:10:54 +08:00
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) }