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

Method ValueNode

internal/yaml/node.go:66–72  ·  view source on GitHub ↗

ValueNode returns the given value node for a key, or nil if not found.

(key string)

Source from the content-addressed store, hash-verified

64
65// ValueNode returns the given value node for a key, or nil if not found.
66func (n *Node) ValueNode(key string) *Node {
67 if idx := n.KeyIndex(key); idx != -1 {
68 return &Node{n.Content[idx+1]}
69 }
70
71 return nil
72}

Callers 1

EnsureKeyMethod · 0.95

Calls 1

KeyIndexMethod · 0.95

Tested by

no test coverage detected