fix: errors

This commit is contained in:
2025-08-06 14:59:39 +08:00
parent c4ad0c1dc9
commit aa20b6d7e6
10 changed files with 188 additions and 23 deletions

View File

@@ -123,6 +123,16 @@ func (r *Renderer) loadTemplates() error {
"eq": func(a, b interface{}) bool {
return fmt.Sprintf("%v", a) == fmt.Sprintf("%v", b)
},
"until": func(n int) []int {
result := make([]int, n)
for i := 0; i < n; i++ {
result[i] = i + 1
}
return result
},
"ge": func(a, b int) bool {
return a >= b
},
}
// Load templates