Browse Source

Merge pull request #1000 from kiendang/print-size

Correct package range in error message
J Guerreiro 5 years atrás
parent
commit
c9f7105481
1 changed files with 1 additions and 1 deletions
  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
 		}