MCPcopy Create free account
hub / github.com/belak/gitdir / NewScalarNode

Function NewScalarNode

internal/yaml/node.go:43–51  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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.
43func 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.

Callers 2

ensureSampleOptionsFunction · 0.92
ensureAdminUserYamlFunction · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected