func NewAddr(sysAddr system.Addr) *Addr { address := sysAddr.Address() reachable, _ := sysAddr.Reachable() return &Addr{ Address: address, Reachable: reachable.(bool), Timeout: 500, } }
func NewAddr(sysAddr system.Addr, config util.Config) (*Addr, error) { address := sysAddr.Address() reachable, err := sysAddr.Reachable() a := &Addr{ Address: address, Reachable: reachable.(bool), Timeout: config.Timeout, } return a, err }