I'm trying to pipe multiple conditions in a single if statement(using text/template package) which should translate into "If $total
== 1 and has
function returns false
display works
". I don't understand how exactly the pipelines work or why I'm getting this non-sense error. As far as I understand when chaining is used (|
) it sends the result as argument to the last command (and
in this case)
{{if eq $total 1 | ne has true | and}}
Works
{{end}}
err template: :29:26: executing "" at <ne>: wrong number of args for ne: want 2 got 2