code: func (cfg *Config) GetPort() int {
  	if cfg.Endpoint != "" && cfg.Endpoint != ":" {
  		index := strings.LastIndex(cfg.Endpoint, ":")
  		if index >= 0 {
  			port, err := strconv.Atoi(cfg.Endpoint[index+1:])
  			if err == nil {
  				return port
  			}
  		}
  	}
  
  	return 0
  }
docs: // GetPort parses suffix from endpoint & returns integer after last ":" (otherwise it returns 0)