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