code: func (s *Server) AdvertiseAddr() string {
  	// set if we have explicit --advertise-ip option
  	advertiseIP := s.getAdvertiseIP()
  	if advertiseIP == "" {
  		return s.addr.Addr
  	}
  	_, port, _ := net.SplitHostPort(s.addr.Addr)
  	ahost, aport, err := utils.ParseAdvertiseAddr(advertiseIP)
  	if err != nil {
  		log.Warningf("Failed to parse advertise address %q, %v, using default value %q.", advertiseIP, err, s.addr.Addr)
  		return s.addr.Addr
  	}
  	if aport == "" {
  		aport = port
  	}
  	return fmt.Sprintf("%v:%v", ahost, aport)
  }
docs: // AdvertiseAddr returns an address this server should be publicly accessible
  // as, in "ip:host" form