MCPcopy Create free account
hub / github.com/auxten/postgresql-parser / Random

Function Random

pkg/util/json/random.go:33–35  ·  view source on GitHub ↗

Random generates a random JSON value.

(complexity int, rng *rand.Rand)

Source from the content-addressed store, hash-verified

31
32// Random generates a random JSON value.
33func Random(complexity int, rng *rand.Rand) (JSON, error) {
34 return MakeJSON(doRandomJSON(complexity, rng))
35}
36
37func randomJSONString(rng *rand.Rand) interface{} {
38 if rng.Intn(2) == 0 {

Callers 1

doRandomJSONFunction · 0.70

Calls 2

MakeJSONFunction · 0.85
doRandomJSONFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…