Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Move ¶
func Move(key, val *yaml.Node)
Move moves a comment between yaml.Node entries after a style change. When a yaml.MappingNode or yaml.SequenceNode has an inline comment, the decoder will set LineComment differently according to the node's style.
When value(s) are on a single line (flow style), LineComment will be set on the value. When value(s) are on multiple lines (block style), LineComment will be set on the key.
If templating changes the node's style, the comment needs to move or else encoding errors will occur.
Types ¶
Click to show internal directories.
Click to hide internal directories.