Use cases for warnf and errorf

I am trying to find out some use cases of both that I can include in my templates.

https://discourse.gohugo.io/t/making-error-message-clearer/41845/2

What I meant is a larger perspective outside markdown. I haven’t seen much discussion around both. But I just found these topics with more insights.
https://kodify.net/hugo/functions/hugo-errorf-function/

It makes a lot of sense to use warning in a module context in order to alert users about a misuse, or missing parameter etc… without necessarily breaking the build.

1 Like

Thank you all. I have ideas now how to go about it.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.