Remove http/s standard port numbers (#3945)

This commit is contained in:
victornet 2022-07-26 11:42:00 +02:00 • committed by GitHub
parent bda2c7abc3
commit 55910059ed
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -53,6 +53,9 @@ type networkConfig struct {
}
func (c networkConfig) HostPort() string {
if c.Schema == "http" && c.Port == 80 || c.Schema == "https" && c.Port == 443 {
return c.Host
}
return net.JoinHostPort(c.Host, strconv.Itoa(c.Port))
}