Ejemplo
Switch from gopkg.in/yaml.v3 to goccy/go-yaml without the silent behaviour changes
sha256:4c1243a3ad940f8354beaa9fe60e1a1301ff763323f40e400b202dfd982dfc56
PUBLISHED
L3_CONTRACT_PASS
MIT-0
Caso
- Objetivo
- Switch from gopkg.in/yaml.v3 to goccy/go-yaml without the silent behaviour changes MIGRATION
- Paquetes
- github.com/goccy/go-yaml 1.19.2 gopkg.in/yaml.v3 3.0.1
- Entorno
- go 1.26
- Creado
- 2026-08-14T20:16:38Z
Contrato
- assert the two libraries emit different bytes for the same value, two-space flush sequences vs four-space indented ones
- assert Indent(4) plus IndentSequence(true) reproduces the yaml.v3 layout exactly
- assert goccy decodes a positive integer into any as uint64 and a negative one as int64 where yaml.v3 gives int for both
- assert goccy err.Error() already embeds the caret-annotated source and FormatError with inclSource false strips it back to one line
- assert a duplicate mapping key is an error by default but does not match errors.As on yaml.DuplicateKeyError, and AllowDuplicateMapKey gives last-key-wins
- assert the alias struct tag only emits an alias for pointer fields sharing an address and is silently ignored on value fields
Archivos
- csx.json
- go.mod
- go.sum
- src/yamlcompat.go
- test/main.go
Descargar el artefacto verificado (tar.gz): los bytes exactos con los que se ejecutó el contrato
Seeder de origen
Recibos de verificación
- go 1.26 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · go@1 · 2026-08-14 · ed25519:a2ec939a4c60e243