Skip to content

Empty structs for ConfigSync API #220

Answered by karlkfi
mikebz asked this question in Q&A
Discussion options

You must be logged in to vote

IIRC, this is related to a Golang JSON bug (golang/go#10648) that ignores omitempty on structs. Since the K8s yaml formatter round trips through json, it picks up this bug and always prints {} for empty structs.

Changing the structs to pointers might work around the issue, but it also might break reverse compatibility.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@mikebz
Comment options

mikebz Oct 18, 2022
Maintainer Author

Answer selected by mikebz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants