Skip to content

Commit

Permalink
fix(ss): udp problem
Browse files Browse the repository at this point in the history
  • Loading branch information
mzz2017 committed Jan 27, 2023
1 parent b42da8d commit de672d0
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions cmd/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ $ gg git clone https://github.com/mzz2017/gg.git`)
}
}
// initiate config from args and config file
log := GetLogger(verbose)
log := NewLogger(verbose)
log.Traceln("Version:", Version)
log.Tracef("OS/Arch: %v/%v\n", runtime.GOOS, runtime.GOARCH)
v, _ = getConfig(log, true, viper.New, cmd)
Expand Down Expand Up @@ -143,7 +143,7 @@ func init() {
rootCmd.AddCommand(configCmd)
}

func GetLogger(verbose int) *logrus.Logger {
func NewLogger(verbose int) *logrus.Logger {
log := logrus.New()

var level logrus.Level
Expand Down
2 changes: 1 addition & 1 deletion common/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ func Max(a, b int) int {
return b
}

func MustMapKeys(m interface{}) (keys []string) {
func MustGetMapKeys(m interface{}) (keys []string) {
v := reflect.ValueOf(m)
vKeys := v.MapKeys()
for _, k := range vKeys {
Expand Down
2 changes: 1 addition & 1 deletion config/bind.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func (b *Binder) Bind(iface interface{}) error {
}
}
if !changed {
return fmt.Errorf("%v: %w", strings.Join(common.MustMapKeys(b.toResolve), ", "), ErrMutualReference)
return fmt.Errorf("%v: %w", strings.Join(common.MustGetMapKeys(b.toResolve), ", "), ErrMutualReference)
}
}
return nil
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ require (
github.com/fatih/structs v1.1.0
github.com/gorilla/websocket v1.4.2
github.com/json-iterator/go v1.1.12
github.com/mzz2017/softwind v0.0.0-20221204151826-2987e0b05820
github.com/mzz2017/softwind v0.0.0-20230127172609-05c5264aa6a4
github.com/nadoo/glider v0.16.2
github.com/pelletier/go-toml v1.9.4
github.com/sirupsen/logrus v1.8.1
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -287,8 +287,8 @@ github.com/mzz2017/disk-bloom v1.0.1 h1:rEF9MiXd9qMW3ibRpqcerLXULoTgRlM21yqqJl1B
github.com/mzz2017/disk-bloom v1.0.1/go.mod h1:JLHETtUu44Z6iBmsqzkOtFlRvXSlKnxjwiBRDapizDI=
github.com/mzz2017/pflag v0.0.0-20211204030847-74e9419ee6b3 h1:i+hUSMSd8hBlPt1zDcbj0lap7Ct7TFZ++At8CqLConE=
github.com/mzz2017/pflag v0.0.0-20211204030847-74e9419ee6b3/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
github.com/mzz2017/softwind v0.0.0-20221204151826-2987e0b05820 h1:kFOj4IouU0Ksdtc/cMnMTdqytDG3HlIRjM4lhLDa530=
github.com/mzz2017/softwind v0.0.0-20221204151826-2987e0b05820/go.mod h1:K1nXwtBokwEsfOfdT/5zV6R8QabGkyhcR0iuTrRZcYY=
github.com/mzz2017/softwind v0.0.0-20230127172609-05c5264aa6a4 h1:A5SQXPnd96JTjUusEZ2U+KTo7sQeAu8q38iu6TPhl2o=
github.com/mzz2017/softwind v0.0.0-20230127172609-05c5264aa6a4/go.mod h1:K1nXwtBokwEsfOfdT/5zV6R8QabGkyhcR0iuTrRZcYY=
github.com/nadoo/glider v0.16.2 h1:lF+Bj+Q58UwFcO4cna0lSjemxaN0bc96OdIOndcFNJM=
github.com/nadoo/glider v0.16.2/go.mod h1:TfmgWSCINk+zrgiu4AW09Z5+4pzTXJdPq4+ifIV2ALw=
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs=
Expand Down

0 comments on commit de672d0

Please sign in to comment.