From 317797acc83fa4d8da444bcd96d52a4c9032055a Mon Sep 17 00:00:00 2001 From: MetaCubeX Date: Fri, 18 Mar 2022 01:25:59 +0800 Subject: [PATCH] 1.fix module package 2.fix govet error --- config/config.go | 4 ++-- go.mod | 2 +- go.sum | 4 ++-- rule/logic/common.go | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/config/config.go b/config/config.go index 902686f9..f57f90ec 100644 --- a/config/config.go +++ b/config/config.go @@ -604,7 +604,7 @@ func parseRules(cfg *RawConfig, proxies map[string]C.Proxy) ([]C.Rule, map[strin if ruleName == "GEOSITE" { if err := initGeoSite(); err != nil { - return nil, nil, fmt.Errorf("can't initial GeoSite: %w", err) + return nil, nil, fmt.Errorf("can't initial GeoSite: %s", err) } initMode = false } @@ -751,7 +751,7 @@ func parseFallbackGeoSite(countries []string, rules []C.Rule) ([]*router.DomainM var sites []*router.DomainMatcher if len(countries) > 0 { if err := initGeoSite(); err != nil { - return nil, fmt.Errorf("can't initial GeoSite: %w", err) + return nil, fmt.Errorf("can't initial GeoSite: %s", err) } } diff --git a/go.mod b/go.mod index e025839e..b41e8704 100644 --- a/go.mod +++ b/go.mod @@ -57,4 +57,4 @@ require ( ) -replace golang.zx2c4.com/wintun v0.0.0-20211104114900-415007cec224 => github.com/MetaCubeX/wintun-go v0.0.0-20220317161916-5dcd44f3c355 +replace golang.zx2c4.com/wintun v0.0.0-20211104114900-415007cec224 => github.com/MetaCubeX/wintun-go v0.0.0-20220317171253-6f83f9e63bab diff --git a/go.sum b/go.sum index 19d85fca..4e1c20dd 100644 --- a/go.sum +++ b/go.sum @@ -10,8 +10,8 @@ git.apache.org/thrift.git v0.0.0-20180902110319-2566ecd5d999/go.mod h1:fPE2ZNJGy github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/Dreamacro/go-shadowsocks2 v0.1.7 h1:8CtbE1HoPPMfrQZGXmlluq6dO2lL31W6WRRE8fabc4Q= github.com/Dreamacro/go-shadowsocks2 v0.1.7/go.mod h1:8p5G4cAj5ZlXwUR+Ww63gfSikr8kvw8uw3TDwLAJpUc= -github.com/MetaCubeX/wintun-go v0.0.0-20220317161916-5dcd44f3c355 h1:mbXCKCy+r8fUoDQh40CFy/lTKmcXpOnzzaFScy8EhRo= -github.com/MetaCubeX/wintun-go v0.0.0-20220317161916-5dcd44f3c355/go.mod h1:ARUuShAtcziEJ/vnZ2hgoP+zc0J7Ukcca2S/NPDoQCc= +github.com/MetaCubeX/wintun-go v0.0.0-20220317171253-6f83f9e63bab h1:1bOdgC9MP1MU108jiREiwCAGiQgbj3FcOpN8YCqny0A= +github.com/MetaCubeX/wintun-go v0.0.0-20220317171253-6f83f9e63bab/go.mod h1:ARUuShAtcziEJ/vnZ2hgoP+zc0J7Ukcca2S/NPDoQCc= github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/bradfitz/go-smtpd v0.0.0-20170404230938-deb6d6237625/go.mod h1:HYsPBTaaSFSlLx/70C2HPIMNZpVV8+vt/A+FMnYP11g= diff --git a/rule/logic/common.go b/rule/logic/common.go index 9cc2bd9a..d28cbc26 100644 --- a/rule/logic/common.go +++ b/rule/logic/common.go @@ -58,7 +58,7 @@ func payloadToRule(subPayload string) (C.Rule, error) { } if tp == "GEOSITE" { if err := initGeoSite(); err != nil { - log.Errorln("can't initial GeoSite: %w", err) + log.Errorln("can't initial GeoSite: %s", err) } }