Add go-critic

This commit is contained in:
9seconds
2018-07-18 08:53:04 +03:00
parent c1b862c1e9
commit c5f99d17b7
7 changed files with 37 additions and 33 deletions
+8 -10
View File
@@ -129,24 +129,22 @@ func main() {
}
conf, err := config.NewConfig(*debug, *verbose,
*bindIP, *bindPort,
*publicIPv4, *publicIPv4Port,
*publicIPv6, *publicIPv6Port,
*statsIP, *statsPort,
*secret, *adtag,
*statsdIP, *statsdPort, *statsdNetwork, *statsdPrefix,
*statsdTagsFormat, *statsdTags,
*bindIP, *publicIPv4, *publicIPv6, *statsIP,
*bindPort, *publicIPv4Port, *publicIPv6Port, *statsPort, *statsdPort,
*secret, *adtag, *statsdIP, *statsdNetwork, *statsdPrefix, *statsdTagsFormat,
*statsdTags,
)
if err != nil {
usage(err.Error())
}
atom := zap.NewAtomicLevel()
if conf.Debug {
switch {
case conf.Debug:
atom.SetLevel(zapcore.DebugLevel)
} else if conf.Verbose {
case conf.Verbose:
atom.SetLevel(zapcore.InfoLevel)
} else {
default:
atom.SetLevel(zapcore.ErrorLevel)
}
encoderCfg := zap.NewProductionEncoderConfig()