Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractStructFieldTagByJSONName ¶
ExtractStructFieldTagByJSONName returns an ast.Visitor that extracts struct field tag value by field's JSON name to tagMap. Kubebuilder struct field may have no name because it can be embedded in the struct (e.g. ObjectMeta). To cover this case, it depends on the field's JSON name, not the field name (which may be empty).
func InjectStructFieldTagByJSONName ¶
InjectStructFieldTagByJSONName returns an ast.Visitor that injects struct field tags by field's JSON name if the given struct field's tag exists in tagMap.
Types ¶
Click to show internal directories.
Click to hide internal directories.