NewScalarNode returns a new node pointing to a yaml value. To use the default type hinting, use the empty string as the tag.
(value string, tag ScalarTag)
| 41 | // NewScalarNode returns a new node pointing to a yaml value. To use the default |
| 42 | // type hinting, use the empty string as the tag. |
| 43 | func NewScalarNode(value string, tag ScalarTag) *Node { |
| 44 | return &Node{ |
| 45 | &yaml.Node{ |
| 46 | Kind: yaml.ScalarNode, |
| 47 | Value: value, |
| 48 | Tag: string(tag), |
| 49 | }, |
| 50 | } |
| 51 | } |
| 52 | |
| 53 | // KeyIndex finds the index of the given key or -1 if not found. Note that it |
| 54 | // will only return an index if index + 1 also exists. |
no outgoing calls
no test coverage detected