Skip to content

Commit

Permalink
Fixed rand_string
Browse files Browse the repository at this point in the history
  • Loading branch information
dave committed Nov 6, 2017
1 parent 00c969b commit 7ff8f4f
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions blaster/template.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,12 @@ func randFloat(from float64, to float64) interface{} {
}

func randString(length int) interface{} {
var s string
for i := 0; i < length; i++ {
s += "A" // TODO
letterRunes := []rune("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ")
b := make([]rune, length)
for i := range b {
b[i] = letterRunes[rand.Intn(len(letterRunes))]
}
return s
return string(b)
}

func init() {
Expand Down

0 comments on commit 7ff8f4f

Please sign in to comment.