tpl/fmt: Add erroridf template func

Fixes #8613
This commit is contained in:
Bjørn Erik Pedersen
2021-06-07 16:36:48 +02:00
parent 282f1aa3db
commit f55d2f4376
19 changed files with 170 additions and 71 deletions

View File

@@ -16,17 +16,17 @@
package page
import (
"github.com/gohugoio/hugo/helpers"
"github.com/gohugoio/hugo/common/loggers"
"github.com/gohugoio/hugo/hugofs"
"github.com/gohugoio/hugo/source"
)
// ZeroFile represents a zero value of source.File with warnings if invoked.
type zeroFile struct {
log *helpers.DistinctLogger
log loggers.Logger
}
func NewZeroFile(log *helpers.DistinctLogger) source.File {
func NewZeroFile(log loggers.Logger) source.File {
return zeroFile{log: log}
}