Skip to content

Commit

Permalink
for-range over int
Browse files Browse the repository at this point in the history
  • Loading branch information
comavius committed May 24, 2024
1 parent 917a35b commit 5092a65
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions testutil/random/ramdom.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,23 +39,23 @@ func Numeric64(t *testing.T, max int64) int64 {

func AlphaNumericSlice(t *testing.T, length int, max int64) []string {
slice := []string{}
for i := 0; i < length; i++ {
for range length {
slice = append(slice, AlphaNumeric(t, int(max)))
}
return slice
}

func NumericSlice(t *testing.T, length int, max int) []int {
slice := []int{}
for i := 0; i < length; i++ {
for range length {
slice = append(slice, Numeric(t, max))
}
return slice
}

func Numeric64Slice(t *testing.T, length int, max int64) []int64 {
slice := []int64{}
for i := 0; i < length; i++ {
for range length {
slice = append(slice, Numeric64(t, max))
}
return slice
Expand Down

0 comments on commit 5092a65

Please sign in to comment.