diff options
Diffstat (limited to 'docs/content/en/functions/errorf.md')
-rw-r--r-- | docs/content/en/functions/errorf.md | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/docs/content/en/functions/errorf.md b/docs/content/en/functions/errorf.md new file mode 100644 index 000000000..9105ff840 --- /dev/null +++ b/docs/content/en/functions/errorf.md @@ -0,0 +1,26 @@ +--- +title: errorf +linktitle: errorf +description: Evaluates a format string and logs it to ERROR. +date: 2017-09-30 +publishdate: 2017-09-30 +lastmod: 2017-09-30 +categories: [functions] +menu: + docs: + parent: "functions" +keywords: [strings, log, error] +signature: ["errorf FORMAT INPUT"] +workson: [] +hugoversion: +relatedfuncs: [printf] +deprecated: false +aliases: [] +--- + +`errorf` will evaluate a format string, then output the result to the ERROR log. +This will also cause the build to fail. + +``` +{{ errorf "Something went horribly wrong! %s" err }} +``` |