MCPcopy Create free account
hub / github.com/cli/cli / randomString

Function randomString

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

Source from the content-addressed store, hash-verified

573var letters = []rune("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ")
574
575func randomString(n int) string {
576 b := make([]rune, n)
577 for i := range b {
578 b[i] = letters[rand.Intn(len(letters))]
579 }
580 return string(b)
581}
582
583func extractScriptName(vars []string) (string, bool) {
584 for _, kv := range vars {

Callers 1

sharedSetupFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected