mirror of
https://github.com/gohugoio/hugo.git
synced 2026-08-24 23:38:53 +00:00
Update errorf.md
This commit is contained in:
committed by
GitHub
parent
b6170774b1
commit
1c0f35fd1a
@@ -19,8 +19,11 @@ aliases: []
|
||||
---
|
||||
|
||||
`errorf` will evaluate a format string, then output the result to the ERROR log.
|
||||
This will also cause the build to fail.
|
||||
|
||||
This will also cause the build to fail (the `hugo` command will `exit -1`).
|
||||
|
||||
```
|
||||
{{ errorf "Something went horribly wrong! %s" err }}
|
||||
{{ errorf "Failed to handle page %q" .Path }}
|
||||
```
|
||||
|
||||
Note that `errorf` supports all the formatting verbs of the [fmt](https://golang.org/pkg/fmt/) package.
|
||||
|
||||
Reference in New Issue
Block a user