pages-server/server/utils/utils.go
2022-08-28 16:21:37 +02:00

13 lines
162 B
Go

package utils
import (
"strings"
)
func TrimHostPort(host string) string {
i := strings.IndexByte(host, ':')
if i >= 0 {
return host[:i]
}
return host
}