MCPcopy
hub / github.com/tidwall/gjson / makeRandomJSONChars

Function makeRandomJSONChars

gjson_test.go:1103–1109  ·  view source on GitHub ↗
(b []byte)

Source from the content-addressed store, hash-verified

1101 "false", "null", `""`, `"\""`, `"a"`}
1102
1103func makeRandomJSONChars(b []byte) {
1104 var bb []byte
1105 for len(bb) < len(b) {
1106 bb = append(bb, jsonchars[rand.Int()%len(jsonchars)]...)
1107 }
1108 copy(b, bb[:len(b)])
1109}
1110
1111func TestValidRandom(t *testing.T) {
1112 rand.Seed(time.Now().UnixNano())

Callers 1

TestValidRandomFunction · 0.85

Calls 1

IntMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…