1
0
Fork 0
hugo/docs/content/en/functions/fmt/Errorf.md

648 B

title description categories keywords params aliases
fmt.Errorf Log an ERROR from a template.
functions_and_methods
aliases returnType signatures
errorf
string
fmt.Errorf FORMAT [INPUT]
/functions/errorf

{{% 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.

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

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