Make great documentation goal 1.2, and plan the README's reorganisation and the nested-template gaps #33
@@ -33,15 +33,10 @@ const (
|
|||||||
// resolveRefs resolved it to; before that, a reference is whole.
|
// resolveRefs resolved it to; before that, a reference is whole.
|
||||||
func splitArm(name string, refs map[string]resolvedRef) arm {
|
func splitArm(name string, refs map[string]resolvedRef) arm {
|
||||||
if grammar.IsRef(name) {
|
if grammar.IsRef(name) {
|
||||||
r, resolved := refs[name]
|
if r, resolved := refs[name]; resolved {
|
||||||
if !resolved || len(r.tail) == 0 {
|
return pathArm(name, r.head, r.tail)
|
||||||
head := name
|
|
||||||
if resolved {
|
|
||||||
head = r.head
|
|
||||||
}
|
|
||||||
return pathArm(name, head, nil)
|
|
||||||
}
|
}
|
||||||
return pathArm(name, r.head, r.tail)
|
return pathArm(name, name, nil)
|
||||||
}
|
}
|
||||||
segs, err := grammar.SplitPath(name)
|
segs, err := grammar.SplitPath(name)
|
||||||
if err != nil || len(segs) == 1 {
|
if err != nil || len(segs) == 1 {
|
||||||
|
|||||||
Reference in New Issue
Block a user