You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
returnnil, fmt.Errorf("render: entries are not valid FBC: %v", err)
79
79
}
80
80
81
+
// track substitution base duplication
82
+
seenBases:=make(map[string]bool)
83
+
// track substitution candidate duplication with different bases
84
+
seenCandidates:=make(map[string]string)
85
+
81
86
// Process each substitution
82
87
for_, substitution:=rangest.Substitutions {
88
+
ifseenBases[substitution.Base] {
89
+
returnnil, fmt.Errorf("render: cannot reuse the same substitution base %q", substitution.Base)
90
+
}
91
+
seenBases[substitution.Base] =true
92
+
93
+
ifcandidateBase, ok:=seenCandidates[substitution.Name]; ok {
94
+
returnnil, fmt.Errorf("render: cannot reuse the same substitution %q for different bases (%q and %q)", substitution.Name, candidateBase, substitution.Base)
0 commit comments