Skip to content

Commit 856cb19

Browse files
Update internal/pkg/args/args.go
Co-authored-by: João Palet <joao.palet@outlook.com>
1 parent 20c1281 commit 856cb19

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

internal/pkg/args/args.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ func SingleArg(argName string, validate func(value string) error) cobra.Position
4444
}
4545

4646
// SingleOptionalArg checks if one or no arguments were provided and validates it if provided
47-
// using the validate function. It returns an error if the argument is invalid.
48-
// For no validation, you can pass a nil validate function
47+
// using the validate function. It returns an error if more than one argument is provided, or if
48+
// the argument is invalid. For no validation, you can pass a nil validate function
4949
func SingleOptionalArg(argName string, validate func(value string) error) cobra.PositionalArgs {
5050
return func(cmd *cobra.Command, args []string) error {
5151
if len(args) > 1 {

0 commit comments

Comments
 (0)