Logo
Explore Help
Sign In
mirrors/pages-server
1
0
Fork 0
You've already forked pages-server
Code Issues Pull Requests Actions Packages Projects Releases Wiki Activity
pages-server/server/utils/utils.go

14 lines
162 B
Go
Raw Normal View History

move helper func in related packages
2021-12-03 03:44:21 +01:00
package utils
switch to std http implementation instead of fasthttp (#106) close #100 close #109 close #113 close #28 close #63 Reviewed-on: https://codeberg.org/Codeberg/pages-server/pulls/106
2022-11-12 20:37:20 +01:00
import (
"strings"
)
move helper func in related packages
2021-12-03 03:44:21 +01:00
switch to std http implementation instead of fasthttp (#106) close #100 close #109 close #113 close #28 close #63 Reviewed-on: https://codeberg.org/Codeberg/pages-server/pulls/106
2022-11-12 20:37:20 +01:00
func TrimHostPort(host string) string {
i := strings.IndexByte(host, ':')
move helper func in related packages
2021-12-03 03:44:21 +01:00
if i >= 0 {
return host[:i]
}
return host
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.23.8 Page: 227ms Template: 4ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API