lego/vendor/github.com/rainycape/memcache/addr.go

24 lines
254 B
Go
Raw Normal View History

package memcache
import (
"net"
)
type Addr struct {
net.Addr
s string
n string
}
func (a *Addr) String() string {
return a.s
}
func NewAddr(addr net.Addr) *Addr {
return &Addr{
Addr: addr,
s: addr.String(),
n: addr.Network(),
}
}