diff options
author | Cameron Moore <moorereason@gmail.com> | 2018-09-06 14:42:55 -0500 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2018-09-07 08:25:51 +0200 |
commit | 600047ff1cb95d061af1983b9a755157eb4941f8 (patch) | |
tree | 47f34c1ed53e0b9fcb192df54be6655390f25125 /source/filesystem.go | |
parent | 5f2e1cb8969c2adac6c866b57cc331e1bc16d4e9 (diff) | |
download | hugo-600047ff1cb95d061af1983b9a755157eb4941f8.tar.gz hugo-600047ff1cb95d061af1983b9a755157eb4941f8.zip |
source: Fix golint godoc issues
Diffstat (limited to 'source/filesystem.go')
-rw-r--r-- | source/filesystem.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/filesystem.go b/source/filesystem.go index 3f4bf0ff1..0c1a6ac7b 100644 --- a/source/filesystem.go +++ b/source/filesystem.go @@ -24,6 +24,7 @@ import ( "golang.org/x/text/unicode/norm" ) +// Filesystem represents a source filesystem. type Filesystem struct { files []ReadableFile filesInit sync.Once @@ -33,14 +34,17 @@ type Filesystem struct { SourceSpec } +// Input describes a source input. type Input interface { Files() []ReadableFile } +// NewFilesystem returns a new filesytem for a given source spec. func (sp SourceSpec) NewFilesystem(base string) *Filesystem { return &Filesystem{SourceSpec: sp, Base: base} } +// Files returns a slice of readable files. func (f *Filesystem) Files() []ReadableFile { f.filesInit.Do(func() { f.captureFiles() |