wireguard-dashboard/utils/website.go
2024-07-05 14:41:35 +08:00

18 lines
225 B
Go

package utils
import "net/url"
type website struct{}
func WebSite() website {
return website{}
}
func (website) GetHost(addr string) string {
uu, err := url.Parse(addr)
if err != nil {
return ""
}
return uu.Host
}