mirror of
https://codeberg.org/video-prize-ranch/rimgo.git
synced 2026-01-28 09:31:13 +00:00
18 lines
311 B
Go
18 lines
311 B
Go
package render
|
|
|
|
import "github.com/mailgun/raymond/v2"
|
|
|
|
func (r *renderer) registerHelpers() {
|
|
funcmap := map[string]any{
|
|
"noteq": noteq,
|
|
}
|
|
raymond.RegisterHelpers(funcmap)
|
|
}
|
|
|
|
func noteq(a, b any, options *raymond.Options) any {
|
|
if raymond.Str(a) != raymond.Str(b) {
|
|
return options.Fn()
|
|
}
|
|
return ""
|
|
}
|