From 0b5124d4d5869f93bb4e0bc67bf31f33a7017fc3 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Wed, 30 Sep 2026 21:45:26 +0200 Subject: [PATCH] Rename checkResolves to checkPathResolves --- format.go | 2 +- path.go | 4 ++-- reference.go | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/format.go b/format.go index db76043..25c7d08 100644 --- a/format.go +++ b/format.go @@ -262,7 +262,7 @@ func checkArm(name string, fields map[string]node, wholeToken bool) error { } return fmt.Errorf("no field %q", a.head) } - if err := checkResolves(field, a.tail, a.head); err != nil { + if err := checkPathResolves(field, a.tail, a.head); err != nil { return fmt.Errorf("field %q: %w", a.head, err) } return nil diff --git a/path.go b/path.go index 5891486..335670c 100644 --- a/path.go +++ b/path.go @@ -472,12 +472,12 @@ func unreachableInChoice(c *choice, want string) error { return fmt.Errorf("not every variant of this %d-way choice carries %q; all carry %v", len(c.items), want, offered) } -func checkResolves(n node, tail []string, level string) error { +func checkPathResolves(n node, tail []string, level string) error { _, err := (&pathCheck{level: level, tail: tail}).run(n) return err } -// compilePath compiles a path checkResolves proved. +// compilePath compiles a path checkPathResolves proved. func compilePath(n node, tail []string) pathCheck { w := pathCheck{tail: tail} if _, err := w.run(n); err != nil { diff --git a/reference.go b/reference.go index 92e65f3..80080e8 100644 --- a/reference.go +++ b/reference.go @@ -147,7 +147,7 @@ func (t *template) resolveLink(folder []string, path, category string, root map[ if category != "" && head == "/"+category { return link, fmt.Errorf("%s: reference {%s}: names the category it sits in; read a sibling field as a path, or move the shared value into its own category and reference that", path, name) } - if err := checkResolves(target, tail, head); err != nil { + if err := checkPathResolves(target, tail, head); err != nil { return link, fmt.Errorf("%s: reference {%s}: %w", path, name, err) } link.refHeads[head] = target