torrent/string-addr.go

12 lines
282 B
Go
Raw Normal View History

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