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

Function randomString

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

Source from the content-addressed store, hash-verified

531var letters = []rune("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ")
532
533func randomString(n int) string {
534 b := make([]rune, n)
535 for i := range b {
536 b[i] = letters[rand.Intn(len(letters))]
537 }
538 return string(b)
539}
540
541func extractScriptName(vars []string) (string, bool) {
542 for _, kv := range vars {

Callers 1

sharedSetupFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected