MCPcopy Create free account
hub / github.com/Ringmast4r/PathFinder / randomString

Function randomString

main.go:3506–3513  ·  view source on GitHub ↗
(length int)

Source from the content-addressed store, hash-verified

3504}
3505
3506func randomString(length int) string {
3507 const charset = "abcdefghijklmnopqrstuvwxyz0123456789"
3508 b := make([]byte, length)
3509 for i := range b {
3510 b[i] = charset[rand.Intn(len(charset))]
3511 }
3512 return string(b)
3513}
3514
3515func formatDuration(d time.Duration) string {
3516 d = d.Round(time.Second)

Callers 1

DetectWildcardMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected