fixed ineffectual assignment
This commit is contained in:
parent
2cc3b11e0f
commit
b229af9607
@ -73,9 +73,8 @@ linters:
|
||||
- unused
|
||||
- promlinter
|
||||
- nestif
|
||||
# - gci
|
||||
- errorlint
|
||||
- ineffassign
|
||||
# - ineffassign
|
||||
- lll
|
||||
- contextcheck
|
||||
- bodyclose
|
||||
|
@ -52,7 +52,7 @@ func SetLogFile(logWay string, logFile string, maxdays int64, disableLogColor bo
|
||||
// SetLogLevel set log level, default is warning
|
||||
// value: error, warning, info, debug, trace
|
||||
func SetLogLevel(logLevel string) {
|
||||
level := 4 // warning
|
||||
var level int
|
||||
switch logLevel {
|
||||
case "error":
|
||||
level = 3
|
||||
|
@ -250,7 +250,7 @@ func (svr *Service) APIProxyByTypeAndName(w http.ResponseWriter, r *http.Request
|
||||
}()
|
||||
log.Info("Http request: [%s]", r.URL.Path)
|
||||
|
||||
proxyStatsResp := GetProxyStatsResp{}
|
||||
var proxyStatsResp GetProxyStatsResp
|
||||
proxyStatsResp, res.Code, res.Msg = svr.getProxyStatsByTypeAndName(proxyType, name)
|
||||
if res.Code != 200 {
|
||||
return
|
||||
|
Loading…
Reference in New Issue
Block a user