Documentation ¶
Index ¶
- func AppendSplit(v cue.Value, splitBy cue.Op, a []cue.Value) []cue.Value
- func Equal(val1 cue.Value, val2 cue.Value) error
- func FirstNonThemaPos(v cue.Value) token.Pos
- func LastSelectorEq(p cue.Path, sel cue.Selector) bool
- func PathHasPrefix(p, prefix cue.Path) bool
- func PathsAreEq(p1, p2 cue.Path) bool
- func PoslistWithoutThema(v cue.Value) []token.Pos
- func PrintPosList(v cue.Value)
- func ReplacePathPrefix(p, oldprefix, newprefix cue.Path) cue.Path
- func SelEq(s1, s2 cue.Selector) bool
- func TrimPathPrefix(path, prefix cue.Path) cue.Path
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendSplit ¶
AppendSplit recursively splits an expression in a single cue.Value by a single operation, flattening it into the slice of cue.Value that are joined by the provided operation in the input value.
Most calls to this should pass nil for the third parameter.
func FirstNonThemaPos ¶
FirstNonThemaPos returns the first token.Pos in the slice returned by PoslistWithoutThema, or token.NoPos if no such pos exists.
func LastSelectorEq ¶
LastSelectorEq tests whether the final selector in the provided path is equivalent to the provided selector. Selectors that vary only by optionality are considered equivalent.
func PathHasPrefix ¶
PathHasPrefix tests whether the cue.Path p begins with prefix.
func PathsAreEq ¶
PathsAreEq tests whether two cue.Path are equivalent. Paths that vary only by optionality are considered equivalent.
func PoslistWithoutThema ¶
PoslistWithoutThema returns all token.Pos associated with a given cue.Value, omitting any token.Pos that point to thema.
func PrintPosList ¶
PrintPosList dumps the cue.Value.Pos for each unified element of the provided cue.Value.
Useful for debugging values with complex multiple unified antecedents.
func ReplacePathPrefix ¶
ReplacePathPrefix replaces oldprefix with newprefix if p begins with oldprefix.
Types ¶
This section is empty.