CloudyKit / jet

Jet template engine
Apache License 2.0
1.24k stars 103 forks source link

Pipe command type string is not func #205

Open StephanSchmidt opened 1 year ago

StephanSchmidt commented 1 year ago

When I do this

... | money("$") | ....

I get

pipe command \"money(\\"$\\")\" type string is not func

with

.AddGlobalFunc("money", func(a jet.Arguments) reflect.Value { a.RequireNumOfArguments("money", 1, 2)

Is there an example on how to do this?

The builtin "repeat(2)" is doing this for example.