mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-23 20:37:12 +01:00
lib/flagutil: make golangci-lint happy by using strings.TrimPrefix instead of manual prefix removal via strings.HasPrefix
This commit is contained in:
parent
9d787f9edd
commit
eb27dbde13
@ -31,9 +31,6 @@ func isHelpArg(arg string) bool {
|
|||||||
if !strings.HasPrefix(arg, "-") {
|
if !strings.HasPrefix(arg, "-") {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
arg = arg[1:]
|
arg = strings.TrimPrefix(arg[1:], "-")
|
||||||
if strings.HasPrefix(arg, "-") {
|
|
||||||
arg = arg[1:]
|
|
||||||
}
|
|
||||||
return arg == "h" || arg == "help"
|
return arg == "h" || arg == "help"
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user