mirror of
https://codeberg.org/Codeberg/pages-server.git
synced 2024-11-05 14:07:01 +00:00
b9966487f6
close #100 close #109 close #113 close #28 close #63 Reviewed-on: https://codeberg.org/Codeberg/pages-server/pulls/106
13 lines
162 B
Go
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
|
|
}
|