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

Function randomString

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

Source from the content-addressed store, hash-verified

1259var letters = []rune("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ")
1260
1261func randomString(n int) string {
1262 b := make([]rune, n)
1263 for i := range b {
1264 b[i] = letters[rand.Intn(len(letters))]
1265 }
1266 return string(b)
1267}
1268
1269func extractScriptName(vars []string) (string, bool) {
1270 for _, kv := range vars {

Callers 2

sharedSetupFunction · 0.85
repositoryMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected