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

Function randKey

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

Source from the content-addressed store, hash-verified

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

Calls 1

StringMethod · 0.45

Tested by

no test coverage detected