diff options
author | Bjørn Erik Pedersen <[email protected]> | 2021-06-07 16:36:48 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2021-06-07 19:11:03 +0200 |
commit | f55d2f43769053b80b419a690554e747dc5dcede (patch) | |
tree | f8c5bdc95df123f2abb04d66b87af4bf9237f086 /tpl/fmt/init.go | |
parent | 282f1aa3db9f6420fdd360e46db1ffadd5b083a1 (diff) | |
download | hugo-f55d2f43769053b80b419a690554e747dc5dcede.tar.gz hugo-f55d2f43769053b80b419a690554e747dc5dcede.zip |
tpl/fmt: Add erroridf template func
Fixes #8613
Diffstat (limited to 'tpl/fmt/init.go')
-rw-r--r-- | tpl/fmt/init.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tpl/fmt/init.go b/tpl/fmt/init.go index 6a2c9a856..f322f5117 100644 --- a/tpl/fmt/init.go +++ b/tpl/fmt/init.go @@ -57,6 +57,13 @@ func init() { }, ) + ns.AddMethodMapping(ctx.Erroridf, + []string{"erroridf"}, + [][2]string{ + {`{{ erroridf "my-err-id" "%s." "failed" }}`, ``}, + }, + ) + ns.AddMethodMapping(ctx.Warnf, []string{"warnf"}, [][2]string{ |