mutate

package
v0.1.19 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 14, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package mutate hosts the shared JSON and form request-mutation helpers used by replay and origination for both in-process and sidecar-owned flows. It depends only on the standard library and go-analyze/bulk.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Form

func Form(body []byte, setForm map[string]string, removeForm []string) ([]byte, error)

Form applies set/remove edits to an application/x-www-form-urlencoded body and returns the re-encoded result. Output is key-sorted for stable diffing.

func JSON

func JSON(body []byte, setJSON map[string]interface{}, removeJSON []string) ([]byte, error)

JSON applies set/remove edits to a JSON body using the map form ({"key": value, "nested.key": value}) and returns the re-encoded result. Returns an error if body is not valid JSON.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL