mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-21 14:44:00 +00: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
1 changed files with 1 additions and 4 deletions
|
@ -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 a new issue