Back to Hugo

fmt.Errorf

docs/content/en/functions/fmt/Errorf.md

0.161.1396 B
Original Source

{{% include "/_common/functions/fmt/format-string.md" %}}

The errorf function evaluates the format string, then prints the result to the ERROR log and fails the build.

go-html-template
{{ errorf "The %q shortcode requires a src argument. See %s" .Name .Position }}

Use the erroridf function to allow optional suppression of specific errors.