GetRandomString returns a random string which is n characters long. If lower is set to true a lower case string is returned.
(n int, lower bool)
| 231 | // GetRandomString returns a random string which is n characters long. |
| 232 | // If lower is set to true a lower case string is returned. |
| 233 | func GetRandomString(n int, lower bool) string { |
| 234 | b := make([]byte, n) |
| 235 | for i := range b { |
| 236 | b[i] = schemaBytes[rand.Intn(len(schemaBytes)-1)] |
| 237 | } |
| 238 | randomString := string(b) |
| 239 | if lower { |
| 240 | randomString = strings.ToLower(randomString) |
| 241 | } |
| 242 | return randomString |
| 243 | } |
| 244 | |
| 245 | var GroupKinds = [...]schema.CommandGroupKind{schema.BuildCommandGroupKind, schema.RunCommandGroupKind, schema.TestCommandGroupKind, schema.DebugCommandGroupKind} |
| 246 |
no outgoing calls
no test coverage detected