Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCameron Moore <moorereason@gmail.com>2018-09-06 22:42:55 +0300
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2018-09-07 09:25:51 +0300
commit600047ff1cb95d061af1983b9a755157eb4941f8 (patch)
tree47f34c1ed53e0b9fcb192df54be6655390f25125 /source/filesystem.go
parent5f2e1cb8969c2adac6c866b57cc331e1bc16d4e9 (diff)
source: Fix golint godoc issues
Diffstat (limited to 'source/filesystem.go')
-rw-r--r--source/filesystem.go4
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()