IsRelative returns true if the receiver is a relative traversal, or false otherwise.
()
| 123 | // IsRelative returns true if the receiver is a relative traversal, or false |
| 124 | // otherwise. |
| 125 | func (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 |
no outgoing calls
no test coverage detected