Why do struct fields such as status
and spec
have omitempty
tag?
#3087
-
The generated code contains an
|
Beta Was this translation helpful? Give feedback.
Answered by
camilamacedo86
Nov 21, 2022
Replies: 2 comments 1 reply
-
Hi @therealak12, That means that the spec value is not mandatory and can be empty. |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
camilamacedo86
-
Closing since it is answered. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @therealak12,
That means that the spec value is not mandatory and can be empty.
Please, see: https://book.kubebuilder.io/reference/markers.html?highlight=omitempty#difference-between--optional-and--kubebuildervalidationoptional