feat: add the -validate mode to interpres-decode
Assisted-by: GLM 5.3 Flash
This commit is contained in:
@@ -9,6 +9,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
|
||||
### Added
|
||||
|
||||
- `interpres-decode -validate [file ...]`: a validate mode beside the
|
||||
toml-test adapter. It parses each named file, or stdin when none are named,
|
||||
prints one line per invalid document to stderr, and exits 0 when all are
|
||||
valid, 1 when one is not, and 2 on a usage or read failure. Install it with
|
||||
`go install .../cmd/interpres-decode@latest`; releases still ship no
|
||||
binaries.
|
||||
- `DecodeError` and `EncodeError`: decode and encode failures are wrapped in
|
||||
typed errors carrying the key path, read with `errors.AsType` instead of
|
||||
parsing the message text. The rendered messages keep their shape; the only
|
||||
|
||||
Reference in New Issue
Block a user