File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -121,19 +121,19 @@ func ValidatePokemonArgs(args []string) error {
121121 // Validate each argument after the Pokémon's name
122122 if len (args ) > 3 {
123123 for _ , arg := range args [3 :] {
124- // Check for single `-` or `--` which are invalid
124+ // Check for an empty flag after Pokémon's name
125125 if arg == "-" || arg == "--" {
126126 errorTitle := styling .ErrorColor .Render ("Error!" )
127127 errorString := fmt .Sprintf (
128- "\n Invalid argument '%s'. Single '-' or '--' is not allowed. \n Please use valid flags ." ,
128+ "\n Empty flag '%s'.\n Please specify valid flag(s) ." ,
129129 arg ,
130130 )
131131 finalErrorMessage := errorTitle + errorString
132132 renderedError := styling .ErrorBorder .Render (finalErrorMessage )
133133 return fmt .Errorf ("%s" , renderedError )
134134 }
135135
136- // Check if the argument starts with a flag prefix but is invalid
136+ // Check if the argument after Pokémon's name is an attempted flag
137137 if arg [0 ] != '-' {
138138 errorTitle := styling .ErrorColor .Render ("Error!" )
139139 errorString := fmt .Sprintf (
You can’t perform that action at this time.
0 commit comments