MCPcopy Create free account
hub / github.com/buger/jsonparser / randKey

Function randKey

property_test.go:83–91  ·  view source on GitHub ↗
(r *mathrand.Rand)

Source from the content-addressed store, hash-verified

81}
82
83func randKey(r *mathrand.Rand) string {
84 letters := "abcdefghijklmnopqrstuvwx"
85 n := r.Intn(6) + 1
86 var b strings.Builder
87 for i := 0; i < n; i++ {
88 b.WriteByte(letters[r.Intn(len(letters))])
89 }
90 return b.String()
91}
92
93func randJSONString(r *mathrand.Rand) string {
94 var choices = []string{

Calls 1

StringMethod · 0.45

Tested by

no test coverage detected