diff --git a/lib/flagutil/usage.go b/lib/flagutil/usage.go index 0e1c56e48..3ddf1f77b 100644 --- a/lib/flagutil/usage.go +++ b/lib/flagutil/usage.go @@ -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" }