fmt.Errorf
Syntax
fmt.Errorf FORMAT [INPUT] ⟼ string
Alias
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.