pages-server/server/utils/utils.go

12 lines
153 B
Go
Raw Normal View History

2021-12-03 02:44:21 +00:00
package utils
import "bytes"
func TrimHostPort(host []byte) []byte {
i := bytes.IndexByte(host, ':')
if i >= 0 {
return host[:i]
}
return host
}