this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

cmd/cue: add `get go` test case with the new omitzero json tag

This shows the current behavior with the new field tag added
in Go 1.24, which is an improvement over omitempty.
The following commit will tweak the behavior.

For #3869.

Signed-off-by: Daniel Martí <mvdan@mvdan.cc>
Change-Id: I4554cb7d7dec9a59f459768427dce5c2b50a246e
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1213250
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com>
Reviewed-by: Roger Peppe <rogpeppe@gmail.com>

+5 -2
+5 -2
cmd/cue/cmd/testdata/script/get_go_types.txtar
··· 108 108 109 109 OptionalOmitEmptyJSON string `json:"optionalOmitEmptyJSON,omitempty"` 110 110 111 + OptionalOmitZeroJSON time.Time `json:"optionalOmitZeroJSON,omitzero"` 112 + 111 113 OptionalOmitEmptyYAML string `yaml:"optionalOmitEmptyYAML,omitempty"` 112 114 113 115 // +optional ··· 328 330 Embed: { 329 331 CustomJSON: #CustomJSON 330 332 } @go(,struct{CustomJSON}) 331 - optionalOmitEmptyJSON?: string @go(OptionalOmitEmptyJSON) 332 - optionalOmitEmptyYAML?: string @go(OptionalOmitEmptyYAML) 333 + optionalOmitEmptyJSON?: string @go(OptionalOmitEmptyJSON) 334 + optionalOmitZeroJSON: time.Time @go(OptionalOmitZeroJSON) 335 + optionalOmitEmptyYAML?: string @go(OptionalOmitEmptyYAML) 333 336 334 337 // +optional 335 338 optionalComment?: string @go(OptionalComment)