MCPcopy
hub / github.com/hashicorp/hcl / IsRelative

Method IsRelative

traversal.go:125–133  ·  view source on GitHub ↗

IsRelative returns true if the receiver is a relative traversal, or false otherwise.

()

Source from the content-addressed store, hash-verified

123// IsRelative returns true if the receiver is a relative traversal, or false
124// otherwise.
125func (t Traversal) IsRelative() bool {
126 if len(t) == 0 {
127 return true
128 }
129 if _, firstIsRoot := t[0].(TraverseRoot); firstIsRoot {
130 return false
131 }
132 return true
133}
134
135// SimpleSplit returns a TraversalSplit where the name lookup is the absolute
136// part and the remainder is the relative part. Supported only for

Callers 6

TraverseRelMethod · 0.95
TraverseAbsMethod · 0.95
SimpleSplitMethod · 0.95
RootNameMethod · 0.95
TraversalJoinFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected