code: func (a *NetAddr) Port(defaultPort int) int {
  	_, port, err := net.SplitHostPort(a.Addr)
  	if err != nil {
  		return defaultPort
  	}
  	porti, err := strconv.Atoi(port)
  	if err != nil {
  		return defaultPort
  	}
  	return porti
  }
docs: // Port returns defaultPort if no port is set or is invalid,
  // the real port otherwise