(rng *rand.Rand)
| 35 | } |
| 36 | |
| 37 | func randomJSONString(rng *rand.Rand) interface{} { |
| 38 | if rng.Intn(2) == 0 { |
| 39 | return staticStrings[rng.Intn(len(staticStrings))] |
| 40 | } |
| 41 | result := make([]byte, 0) |
| 42 | l := rng.Intn(10) + 3 |
| 43 | for i := 0; i < l; i++ { |
| 44 | result = append(result, byte(rng.Intn(0x7f-0x20)+0x20)) |
| 45 | } |
| 46 | return string(result) |
| 47 | } |
| 48 | |
| 49 | func randomJSONNumber(rng *rand.Rand) interface{} { |
| 50 | return json.Number(fmt.Sprintf("%v", rng.ExpFloat64())) |
no test coverage detected
searching dependent graphs…