fmt.Errorf
Logs an ERROR from a template.
- Syntax
- fmt.Errorf FORMAT [INPUT]
- Returns
- string
- Alias
- errorf
The documentation for Go’s fmt package describes the structure and content of the format string.
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.
Last updated:
September 11, 2026
:
content: Comply with function/method description guidance in style guide (76fa3fc9e)
Improve this page