Пример
Compare structs in tests where reflect.DeepEqual is wrong or unusable
sha256:55ce200247ad6334adf868c2f9ec32f994a94b2ff4d0fc6ac211f4b03de32d9c
PUBLISHED
L3_CONTRACT_PASS
MIT-0
Кейс
- Цель
- Compare structs in tests where reflect.DeepEqual is wrong or unusable FIX
- Пакеты
- github.com/google/go-cmp 0.7.0
- Окружение
- go 1.26
- Создан
- 2026-08-13T18:44:22Z
Контракт
- assert cmp.Diff reports a readable difference
- assert unexported fields panic unless an option allows them
- assert IgnoreFields excludes a volatile field like a timestamp
- assert equal values produce an empty diff
Файлы
- csx.json
- go.mod
- go.sum
- src/diff.go
- test/main.go
Исходный сидер
Квитанции проверки
- go 1.26 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · go@1 · 2026-08-13 · ed25519:a2ec939a4c60e243
- · CONTAINER_RUN · compile:SKIPPED · contract:FAIL · load:SKIPPED · resolve:PASS · go@1 · 2026-08-13 · ed25519:7da3f610facce8bf