Documentation
¶
Overview ¶
Package yaml provides generic YAML read and write operations.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type RefString ¶
type RefString string
RefString is a string that is a reference to another resource.
func (RefString) MarshalYAML ¶
MarshalYAML implements the yaml.Marshaler interface.
type StringSlice ¶
type StringSlice []string
StringSlice is a custom slice of strings that allows for fine-grained control over YAML marshaling when used with the 'omitempty' tag.
By implementing the yaml.IsZeroer interface, it ensures that:
- A nil slice is considered "zero" and is omitted from the output.
- An empty but initialized slice (e.g., []string{}) is NOT considered "zero" and is explicitly marshaled as an empty YAML sequence ([]).
func (StringSlice) IsZero ¶
func (s StringSlice) IsZero() bool
IsZero implements the yaml.IsZeroer interface, which determines whether a field should be considered "empty" when the 'omitempty' struct tag is used.
Click to show internal directories.
Click to hide internal directories.