wireguard-dashboard/utils/url.go
coward 3e112cb672
Some checks reported errors
continuous-integration/drone/tag Build was killed
🎨优化token生成以及加强验证
2024-06-18 15:20:17 +08:00

17 lines
234 B
Go

package utils
import "net/url"
// GetHost
// @description: 获取指定地址的host
// @param addr
// @return string
func GetHost(addr string) string {
uu, err := url.Parse(addr)
if err != nil {
return ""
}
return uu.Host
}