Skip to content

Commit 0b24f60

Browse files
committed
fixup!: remove variable expectedNumOfArgs
1 parent 5e43da3 commit 0b24f60

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

cli/cliarg/cliarg.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@ import (
1919
// Expects 1 arg based on namedArg, otherwise returns customErrorMessage
2020
func ExactNamedArg(namedArg string, customErrorMessage string) cobra.PositionalArgs {
2121
return func(cmd *cobra.Command, args []string) error {
22-
expectedNumOfArgs := 1
23-
if len(args) != expectedNumOfArgs {
22+
if len(args) != 1 {
2423
return fmt.Errorf("this command accepts <%s> as an argument, received no arguments. %s", namedArg, customErrorMessage)
2524
}
2625
return nil

0 commit comments

Comments
 (0)