Parcourir la source

Merge pull request #1000 from kiendang/print-size

Correct package range in error message
J Guerreiro il y a 5 ans
Parent
commit
c9f7105481
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      print.go

+ 1 - 1
print.go

@@ -663,7 +663,7 @@ func providerMenu(dep string, providers providers) *rpc.Pkg {
 		}
 
 		if num < 1 || num >= size {
-			fmt.Fprintf(os.Stderr, "%s invalid value: %d is not between %d and %d\n", red("error:"), num, 1, size)
+			fmt.Fprintf(os.Stderr, "%s invalid value: %d is not between %d and %d\n", red("error:"), num, 1, size - 1)
 			continue
 		}