MCPcopy Index your code
hub / github.com/cli/cli / randomString

Function randomString

acceptance/acceptance_test.go:445–451  ·  view source on GitHub ↗
(n int)

Source from the content-addressed store, hash-verified

443var letters = []rune("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ")
444
445func randomString(n int) string {
446 b := make([]rune, n)
447 for i := range b {
448 b[i] = letters[rand.Intn(len(letters))]
449 }
450 return string(b)
451}
452
453func extractScriptName(vars []string) (string, bool) {
454 for _, kv := range vars {

Callers 1

sharedSetupFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected