RandString returns a random string of given length n.
(n int)
| 184 | |
| 185 | // RandString returns a random string of given length n. |
| 186 | func RandString(n int) string { |
| 187 | b := make([]byte, n) |
| 188 | for i := range b { |
| 189 | b[i] = letterBytes[rand.Intn(len(letterBytes))] |
| 190 | } |
| 191 | return string(b) |
| 192 | } |
| 193 | |
| 194 | // HashSalt returns a hash of the projectName to be used as a salt. |
| 195 | // This is appropriate only for development work, but means |
no outgoing calls