]> 127.0.0.1 Git - part/.git/commitdiff
fix v0.5.35
authorqydysky <qydysky@foxmail.com>
Thu, 24 Jun 2021 17:21:18 +0000 (01:21 +0800)
committerqydysky <qydysky@foxmail.com>
Thu, 24 Jun 2021 17:21:18 +0000 (01:21 +0800)
Net.go

diff --git a/Net.go b/Net.go
index d2ca6558c35da3fa9f24ce7c1ce6edf56aa63327..a2b6e8215b7d9a9286b2da8a4083903b0a5ca685 100644 (file)
--- 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
     }