applyMutation picks one operator at random and applies it.
(r *rand.Rand, data []byte)
| 542 | |
| 543 | // applyMutation picks one operator at random and applies it. |
| 544 | func applyMutation(r *rand.Rand, data []byte) []byte { |
| 545 | if len(data) < 2 { |
| 546 | return data |
| 547 | } |
| 548 | op := mutationOps[r.Intn(len(mutationOps))] |
| 549 | return op(r, data) |
| 550 | } |
| 551 | |
| 552 | // findStructuralBytes returns the positions of all bytes in data that match |
| 553 | // any of targets. Returns nil if none are found. |
no outgoing calls
no test coverage detected