GoForge — Build | Test | Ship | Collaborate GoForge — Build | Test | Ship | Collaborate
v1.0.3

yq

The YAML/JSON/XML processor, rewritten in Go+

$ go install goforge.dev/gpyq/cmd/yq@v1.0.3

Current release — v1.0.3. goforge.dev/gpyq is a Go+ reimplementation of mikefarah/yq v4.53.3, byte-identical to the upstream binary across a broad multi-format differential battery. The installable artifact is still yq — install with go install goforge.dev/gpyq/cmd/yq@v1.0.3. The current line shares wildcard key matching through std/pathquery and consumes Go+ stdlib v0.207.0.

GoForge yq targets mikefarah/yq v4.53.3. The whole processor — the expression lexer/parser, the operator library, and the YAML/JSON/XML/TOML/CSV/properties/ LUA/base64/URI en/decoders — is authored in Go+ and distributed as generated Go; consumers never need the toolchain.

Parity

yq --version reports v4.53.3 and the binary is differential-identical to the pinned upstream binary across a ~60-case battery: path/traverse, array index/slice/splat, sort/sort_by, keys/to_entries/from_entries, assignment (=, |=), select/map, the .a * .b merge, env/load, arithmetic and string ops, unique/reverse/flatten/group_by/pick, and the multi-format round-trips -o=json/xml/toml/props/csv/tsv plus -p=json/xml/props input. The full upstream test suite passes.

Go+ authorship

~18k lines of yq’s own logic are authored in 115 .gp source files (only the //go:build feature-flag files — the yq_no* conditional-format stack and the GOOS splits — stay hand-written Go), reusing the same libraries (goccy/go-yaml, goccy/go-json, pelletier/go-toml, cobra, orderedmap). Generation is deterministic and goplus gen -check is clean against released goplus v0.139.0.

Honest about its shape: yq introduces zero enums. Its discriminators are wire-coupled — output-format names, node/style bitsets mirroring the YAML library’s kinds, and a struct-valued operationType dispatch table — not scalar sums, so the wire formats are preserved byte-for-byte rather than reshaped.

Notes

Faithful to pinned upstream MIT provenance (© 2017 Mike Farah). Third-party dependencies are unchanged. See the repository’s PARITY.md for the parity ledger.