mox/dsn/nameip.go

16 lines
241 B
Go
Raw Normal View History

2023-01-30 16:27:06 +03:00
package dsn
import (
"net"
)
// NameIP represents a name and possibly IP, e.g. representing a connection destination.
type NameIP struct {
Name string
IP net.IP
}
func (n NameIP) IsZero() bool {
return n.Name == "" && n.IP == nil
}