This commit is contained in:
coward
2024-07-05 14:41:35 +08:00
commit 1f7f57ec9f
70 changed files with 4923 additions and 0 deletions

17
utils/website.go Normal file
View File

@@ -0,0 +1,17 @@
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
}