mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-14 20:33:59 +02:00
@@ -53,6 +53,8 @@ type fileOverlap interface {
|
||||
// Lang is the language code for this page. It will be the
|
||||
// same as the site's language code.
|
||||
Lang() string
|
||||
|
||||
IsZero() bool
|
||||
}
|
||||
|
||||
type FileWithoutOverlap interface {
|
||||
@@ -187,6 +189,10 @@ func (fi *FileInfo) Open() (hugio.ReadSeekCloser, error) {
|
||||
return f, err
|
||||
}
|
||||
|
||||
func (fi *FileInfo) IsZero() bool {
|
||||
return fi == nil
|
||||
}
|
||||
|
||||
// We create a lot of these FileInfo objects, but there are parts of it used only
|
||||
// in some cases that is slightly expensive to construct.
|
||||
func (fi *FileInfo) init() {
|
||||
|
Reference in New Issue
Block a user