MCPcopy
hub / github.com/redspread/spread / randomString

Function randomString

pkg/entity/entity_test.go:188–195  ·  view source on GitHub ↗
(strlen int)

Source from the content-addressed store, hash-verified

186}
187
188func randomString(strlen int) string {
189 const chars = "abcdefghijklmnopqrstuvwxyz0123456789"
190 result := make([]byte, strlen)
191 for i := 0; i < strlen; i++ {
192 result[i] = chars[rand.Intn(len(chars))]
193 }
194 return string(result)
195}
196
197func createSecret(name string) *kube.Secret {
198 return &kube.Secret{

Callers 6

testRandomContainerFunction · 0.70
TestBaseNewFunction · 0.70
TestBaseNoDefaultsFunction · 0.70
createSecretFunction · 0.70
testRandomObjectsFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected