Documentation
¶
Overview ¶
Package wire is the JSON door into trackparse: every public function called with loose JSON arguments, returning JSON. The shared fixtures, the cross-port diff (scripts/compare-ports.mjs through internal/cmd/dump) and fuzzers use it. Options arrive as loose JSON and are resolved with the same fallbacks as the JavaScript reference (a bad value means the default, SPEC R0.8).
The package is internal so loose JSON never becomes public API. It holds only a hook: the root package trackparse fills it in when it is initialized, but only when it is built with -tags trackparse_wire (wire_hook.go), so programs that use the module never link the JSON door. A program that calls Call must import trackparse (a blank import is enough) and be built with that tag.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Call func(line []byte) []byte
Call runs one case. line is a JSON object {"fn", "input", "options", "formatOptions", "edits"} as in the shared fixtures (fn defaults to "parse", options and formatOptions to {}, edits to []); the result is the JSON text of the function's output, as the JavaScript package writes it. A line that is not a JSON object, or an unknown fn, gives null. Never panics.
Nil unless the trackparse package is built with -tags trackparse_wire and initialized.
Functions ¶
This section is empty.
Types ¶
This section is empty.