hugo

Fork of github.com/gohugoio/hugo with reverse pagination support

git clone git://git.shimmy1996.com/hugo.git

zero_file.autogen.go (3211B)

    1 // Copyright 2019 The Hugo Authors. All rights reserved.
    2 //
    3 // Licensed under the Apache License, Version 2.0 (the "License");
    4 // you may not use this file except in compliance with the License.
    5 // You may obtain a copy of the License at
    6 // http://www.apache.org/licenses/LICENSE-2.0
    7 //
    8 // Unless required by applicable law or agreed to in writing, software
    9 // distributed under the License is distributed on an "AS IS" BASIS,
   10 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   11 // See the License for the specific language governing permissions and
   12 // limitations under the License.
   13 
   14 // This file is autogenerated.
   15 
   16 package page
   17 
   18 import (
   19 	"github.com/gohugoio/hugo/common/loggers"
   20 	"github.com/gohugoio/hugo/hugofs"
   21 	"github.com/gohugoio/hugo/source"
   22 )
   23 
   24 // ZeroFile represents a zero value of source.File with warnings if invoked.
   25 type zeroFile struct {
   26 	log loggers.Logger
   27 }
   28 
   29 func NewZeroFile(log loggers.Logger) source.File {
   30 	return zeroFile{log: log}
   31 }
   32 
   33 func (zeroFile) IsZero() bool {
   34 	return true
   35 }
   36 
   37 func (z zeroFile) Path() (o0 string) {
   38 	z.log.Warnln(".File.Path on zero object. Wrap it in if or with: {{ with .File }}{{ .Path }}{{ end }}")
   39 	return
   40 }
   41 func (z zeroFile) Section() (o0 string) {
   42 	z.log.Warnln(".File.Section on zero object. Wrap it in if or with: {{ with .File }}{{ .Section }}{{ end }}")
   43 	return
   44 }
   45 func (z zeroFile) Lang() (o0 string) {
   46 	z.log.Warnln(".File.Lang on zero object. Wrap it in if or with: {{ with .File }}{{ .Lang }}{{ end }}")
   47 	return
   48 }
   49 func (z zeroFile) Filename() (o0 string) {
   50 	z.log.Warnln(".File.Filename on zero object. Wrap it in if or with: {{ with .File }}{{ .Filename }}{{ end }}")
   51 	return
   52 }
   53 func (z zeroFile) Dir() (o0 string) {
   54 	z.log.Warnln(".File.Dir on zero object. Wrap it in if or with: {{ with .File }}{{ .Dir }}{{ end }}")
   55 	return
   56 }
   57 func (z zeroFile) Extension() (o0 string) {
   58 	z.log.Warnln(".File.Extension on zero object. Wrap it in if or with: {{ with .File }}{{ .Extension }}{{ end }}")
   59 	return
   60 }
   61 func (z zeroFile) Ext() (o0 string) {
   62 	z.log.Warnln(".File.Ext on zero object. Wrap it in if or with: {{ with .File }}{{ .Ext }}{{ end }}")
   63 	return
   64 }
   65 func (z zeroFile) LogicalName() (o0 string) {
   66 	z.log.Warnln(".File.LogicalName on zero object. Wrap it in if or with: {{ with .File }}{{ .LogicalName }}{{ end }}")
   67 	return
   68 }
   69 func (z zeroFile) BaseFileName() (o0 string) {
   70 	z.log.Warnln(".File.BaseFileName on zero object. Wrap it in if or with: {{ with .File }}{{ .BaseFileName }}{{ end }}")
   71 	return
   72 }
   73 func (z zeroFile) TranslationBaseName() (o0 string) {
   74 	z.log.Warnln(".File.TranslationBaseName on zero object. Wrap it in if or with: {{ with .File }}{{ .TranslationBaseName }}{{ end }}")
   75 	return
   76 }
   77 func (z zeroFile) ContentBaseName() (o0 string) {
   78 	z.log.Warnln(".File.ContentBaseName on zero object. Wrap it in if or with: {{ with .File }}{{ .ContentBaseName }}{{ end }}")
   79 	return
   80 }
   81 func (z zeroFile) UniqueID() (o0 string) {
   82 	z.log.Warnln(".File.UniqueID on zero object. Wrap it in if or with: {{ with .File }}{{ .UniqueID }}{{ end }}")
   83 	return
   84 }
   85 func (z zeroFile) FileInfo() (o0 hugofs.FileMetaInfo) {
   86 	z.log.Warnln(".File.FileInfo on zero object. Wrap it in if or with: {{ with .File }}{{ .FileInfo }}{{ end }}")
   87 	return
   88 }