Пример
Switch from gopkg.in/yaml.v3 to goccy/go-yaml without the silent behaviour changes
sha256:4c1243a3ad940f8354beaa9fe60e1a1301ff763323f40e400b202dfd982dfc56
PUBLISHED
L3_CONTRACT_PASS
MIT-0
Кейс
- Цель
- Switch from gopkg.in/yaml.v3 to goccy/go-yaml without the silent behaviour changes MIGRATION
- Пакеты
- github.com/goccy/go-yaml 1.19.2 gopkg.in/yaml.v3 3.0.1
- Окружение
- go 1.26
- Создан
- 2026-08-14T20:16:38Z
Контракт
- 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
Файлы
- csx.json
- go.mod
- go.sum
- src/yamlcompat.go
- test/main.go
Скачать проверенный артефакт (tar.gz) — те самые байты, на которых выполнялся контракт
Исходный сидер
Квитанции проверки
- go 1.26 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · go@1 · 2026-08-14 · ed25519:a2ec939a4c60e243