mirror of
https://github.com/stilleshan/dockerfiles.git
synced 2025-11-03 10:40:56 +08:00
update ddns-aliyun
This commit is contained in:
@@ -16,6 +16,15 @@ var funcs = map[string]interface{}{
|
||||
"reslove": cip.ResloveIPv4,
|
||||
}
|
||||
|
||||
func contains(slice []string, item string) bool {
|
||||
set := make(map[string]struct{}, len(slice))
|
||||
for _, s := range slice {
|
||||
set[s] = struct{}{}
|
||||
}
|
||||
_, ok := set[item]
|
||||
return ok
|
||||
}
|
||||
|
||||
func ip2locCN(ip string) (str string) {
|
||||
if strings.Count(ip, `.`) < 3 {
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user