diff options
author | Jorin Vogel <[email protected]> | 2017-08-02 14:25:05 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2017-08-03 15:57:51 +0200 |
commit | 81c13171a985b89f2af6682dbd1d4b8766cb9af7 (patch) | |
tree | db39d78bbe6da0ea3f3dd3d2f94c7e1571ad8fd6 /source | |
parent | 9891c0fb0eb274b8a95b62c40070a87a6e04088c (diff) | |
download | hugo-81c13171a985b89f2af6682dbd1d4b8766cb9af7.tar.gz hugo-81c13171a985b89f2af6682dbd1d4b8766cb9af7.zip |
Add some missing doc comments
As pointed out by the linter, some exported functions and types are
missing doc comments.
The linter warnings have been reduced from 194 to 116.
Not all missing comments have been added in this commit though.
Diffstat (limited to 'source')
-rw-r--r-- | source/file.go | 2 | ||||
-rw-r--r-- | source/inmemory.go | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/source/file.go b/source/file.go index e2322bc4c..cbd83d17b 100644 --- a/source/file.go +++ b/source/file.go @@ -24,6 +24,7 @@ import ( "github.com/gohugoio/hugo/helpers" ) +// SourceSpec abstracts language-specific file creation. type SourceSpec struct { Cfg config.Provider Fs *hugofs.Fs @@ -32,6 +33,7 @@ type SourceSpec struct { defaultContentLanguage string } +// NewSourceSpec initializes SourceSpec using languages from a given configuration. func NewSourceSpec(cfg config.Provider, fs *hugofs.Fs) SourceSpec { defaultLang := cfg.GetString("defaultContentLanguage") languages := cfg.GetStringMap("languages") diff --git a/source/inmemory.go b/source/inmemory.go index 431236a56..387bde3b8 100644 --- a/source/inmemory.go +++ b/source/inmemory.go @@ -13,6 +13,8 @@ package source +// ByteSource represents a source's name and content. +// It's currently only used for testing purposes. type ByteSource struct { Name string Content []byte |