Return link's and format compile's outputs as templateLink and formatOps, assigned once in linkTemplate

This commit is contained in:
2026-09-28 23:37:32 +02:00
committed by Lillem4n
parent 243094e4ab
commit e257dc0e6e
17 changed files with 120 additions and 118 deletions
+2 -2
View File
@@ -40,8 +40,8 @@ func TestGrowIsALowerBound(t *testing.T) {
}
for i := 0; i < 50; i++ {
var set holdSet
if got := len(expand(f.rand, tmpl, renderScope{set: &set})); got < tmpl.grow {
t.Errorf("format %q: expand emitted %d bytes, below grow %d", format, got, tmpl.grow)
if got := len(expand(f.rand, tmpl, renderScope{set: &set})); got < tmpl.compiled.grow {
t.Errorf("format %q: expand emitted %d bytes, below grow %d", format, got, tmpl.compiled.grow)
}
}
}