Name the column each case of columnReadOf reads, strip a head's / in categoryOf, and say on resolvedRef that its head carries the /
This commit is contained in:
+4
-1
@@ -8,12 +8,15 @@ import (
|
||||
)
|
||||
|
||||
// resolvedRef is what a reference resolves to: the head its category is held
|
||||
// under, and the tail read into it.
|
||||
// under, its path from the root behind a "/", and the tail read into it.
|
||||
type resolvedRef struct {
|
||||
head string
|
||||
tail []string
|
||||
}
|
||||
|
||||
// categoryOf is the category path a resolvedRef's head names: the head without its "/".
|
||||
func categoryOf(head string) string { return strings.TrimPrefix(head, "/") }
|
||||
|
||||
// refSegments resolves a reference written in folder to a path from the root.
|
||||
func refSegments(name string, folder []string) ([]string, error) {
|
||||
sigil, rest, err := grammar.RefShape(name)
|
||||
|
||||
Reference in New Issue
Block a user