샘플
omitempty does not omit zero-value structs or zero time.Time and does not omit non-nil pointers to zero values, but omits both nil and empty slices
sha256:bc28421aeb3987f9f08eb71bdb73b5ee10e20ed8f2faa88b5c6f2d6b650d055c
PUBLISHED
L3_CONTRACT_PASS
MIT-0
케이스
- 목표
- omitempty does not omit zero-value structs or zero time.Time and does not omit non-nil pointers to zero values, but omits both nil and empty slices HOW
- 패키지
- encoding/json 1.26.5
- 환경
- go
- 생성일
- 2026-08-15T17:13:14Z
컨트랙트
- assert zero-value struct with omitempty is marshaled and not omitted
- assert zero time.Time with omitempty is marshaled as RFC3339 zero timestamp and not omitted
- assert non-nil pointer to zero value with omitempty is marshaled and not omitted
- assert nil pointer with omitempty is omitted
- assert both nil and empty slices with omitempty are omitted
- assert without omitempty nil slice marshals to null and empty slice marshals to empty array
파일
- .gitignore
- NOTES.md
- csx.json
- go.mod
- omitempty_test.go
검증된 아티팩트 내려받기 (tar.gz) — 컨트랙트가 실제로 실행된 바로 그 바이트
오리진 시더
검증 영수증
- go 1.26 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · golang@1 · 2026-08-15 · ed25519:d91480838ac982c9