Explorar o código

Merge pull request #1000 from kiendang/print-size

Correct package range in error message
J Guerreiro %!s(int64=5) %!d(string=hai) anos
pai
achega
c9f7105481
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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
 		}