:tada:初步完成用户

This commit is contained in:
coward
2024-10-18 17:19:19 +08:00
commit f375118c88
45 changed files with 3302 additions and 0 deletions

23
utils/website.go Normal file
View File

@@ -0,0 +1,23 @@
package utils
import "net/url"
type website struct{}
func WebSite() website {
return website{}
}
// GetHost
// @description: 获取主机host
// @receiver website
// @param addr
// @return string
func (website) GetHost(addr string) string {
uu, err := url.Parse(addr)
if err != nil {
return ""
}
return uu.Host
}