pages-server/server/utils/utils.go
2021-12-05 14:48:47 +01:00

12 lines
153 B
Go

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