mirror of
https://github.com/tiennm99/hugoDocs.git
synced 2026-10-13 20:14:58 +00:00
Update errorf.md
This commit is contained in:
1 parent
b6170774b1
commit
1c0f35fd1a
1 file changed
+5
-2
@@ -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