Files
hugoDocs/content/en/functions/fmt/Errorf.md
T

921 B

title, description, categories, keywords, action, aliases
title description categories keywords action aliases
fmt.Errorf Log an ERROR from a template.
aliases related returnType signatures
errorf
functions/fmt/Erroridf
functions/fmt/Warnf
string
fmt.Errorf FORMAT [INPUT]
/functions/errorf

The documentation for Go's fmt package describes the structure and content of the format string.

Like the printf function, the errorf function evaluates the format string. It then prints the result to the ERROR log and fails the build. Hugo prints each unique message once to avoid flooding the log with duplicate errors.

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

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