File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -25,10 +25,14 @@ linters:
25
25
preference : WhenRequired
26
26
policy : SuggestFix
27
27
omitEmpty :
28
- # Ignore missing omitempty so that we can omit the omitempty for discoverability.
29
- # Discoverability is for configuration APIs, generally singletons.
30
- # Refer to the API conventions for when to use discoverability (not our default stance).
31
- policy : Ignore
28
+ # This will force omitempty on optional fields.
29
+ # This is in line with upstream guidance where optional fields should be omitted
30
+ # from the serialized output unless they are non-zero.
31
+ policy : SuggestFix
32
+ omitzero :
33
+ # This will force omitzero on optional struct fields.
34
+ # This means they can be omitted correctly and prevents the need for pointers to structs.
35
+ policy : SuggestFix
32
36
requiredFields :
33
37
pointers :
34
38
# This will force pointers when the field is required, but only when the zero
You can’t perform that action at this time.
0 commit comments