You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Switch to sigs.k8s.io/yaml instead of default; fixup jozufile struct
Switch to using sigs.k8s.io/yaml for YAML serialization/deserialization
to avoid ambiguity between JSON and YAML representations of the
Jozufile.
gopkg.in/yaml.v3 uses a separate struct tag for YAML fields, leaving
ambiguity between the JSON and YAML serialized format of a struct,
unless struct tags are repeated:
type myStruct struct {
myfield string `json:"myfield,omitempty",yaml:"myfield,omitempty"`
}
sigs.k8s.io/yaml instead reuses json struct tags, allowing for one
specification to apply to both formats.
In addition, this commit adds the `omitempty` tag to fields, to avoid
serializing empty structs, and converts struct fields to pointers to
ensure they can be nil/empty
0 commit comments