mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-12-12 20:55:22 +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
bdac2171f1
commit
528587deef
@ -31,9 +31,6 @@ func isHelpArg(arg string) bool {
|
||||
if !strings.HasPrefix(arg, "-") {
|
||||
return false
|
||||
}
|
||||
arg = arg[1:]
|
||||
if strings.HasPrefix(arg, "-") {
|
||||
arg = arg[1:]
|
||||
}
|
||||
arg = strings.TrimPrefix(arg[1:], "-")
|
||||
return arg == "h" || arg == "help"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user