Add boolean value comparison to where tpl function
authorTatsushi Demachi <tdemachi@gmail.com>
Mon, 7 Dec 2015 20:28:36 +0000 (05:28 +0900)
committerTatsushi Demachi <tdemachi@gmail.com>
Mon, 7 Dec 2015 20:39:11 +0000 (05:39 +0900)
commitf3c74c9db484c8961e70cb3458f9e41e7832fa12
tree06bcf43a6bdcfe98fb33ba9b2d07fce5dd9594ee
parente445c35d6a0c7f5fc2f90f31226cd1d46e048bbc
Add boolean value comparison to where tpl function

`where` template function's internal condition check function doesn't
check boolean values and always returns `false` silently.

This adds missing boolean value comparison to the function.
`where Values ".Param.key" true` like clause can be used.

Only "=", "==", "eq", "!=", "<>", "ne" operators are allowed to be used
with a boolean value. If an other operator is passed with it, the
condition check function returns `false` like before.
tpl/template_funcs.go
tpl/template_funcs_test.go