pages-server/server/utils/utils.go

14 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
}