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

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