From: qydysky Date: Thu, 24 Jun 2021 17:21:18 +0000 (+0800) Subject: fix X-Git-Tag: v0.5.35 X-Git-Url: http://127.0.0.1:8081/?a=commitdiff_plain;h=bc95a9435426f68c9b9000a2d9fa4ea16b018a3c;p=part%2F.git fix --- diff --git a/Net.go b/Net.go index d2ca655..a2b6e82 100644 --- a/Net.go +++ b/Net.go @@ -259,7 +259,7 @@ func MasterDomain(url_s string) (string,error){ return "",e } else { host := u.Hostname() - list := strings.SplitAfter(host, ".") + list := strings.Split(host, ".") if len(list) < 2 {return "",errors.New("invalid domain:"+host)} return strings.Join(list[len(list)-2:], "."),nil }