wire

package
v0.8.2 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2026 License: MIT Imports: 0 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

View Source
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.

Jump to

Keyboard shortcuts

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