New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow function calls in {% if %} without returning *Value #10
Comments
It's already on my TODO-list. See #9. :-) Will work on it. |
Sorry, I didn't notice. I started writing this issue, then had to leave for a few hours. Didn't think about checking for new issues when I came back to finish/post it, but it turns out I wasn't the only one thinking about this today. :-) |
No problem, yeah, was a coincidence. :-) |
Should be fixed now with the latest 2 commits. Any types in function arguments and return values are allowed now. Can you confirm this works for you? |
Yes, perfect! :-) 👍 |
Great. :-) |
If I do something like {% if page.PublishTime.IsZero %}, I get a panic "function return type of 'page.PublishTime.IsZero' must be of type *Value."
It would be very convenient if at least regular functions that return a boolean could be used in if blocks. This doesn't just apply to time.Time, but also any other struct type passed into templates.
What do you think?
The text was updated successfully, but these errors were encountered: