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.
This commit is contained in:
Jorin Vogel 2017-08-02 14:25:05 +02:00 committed by Bjørn Erik Pedersen
parent 9891c0fb0e
commit 81c13171a9
30 changed files with 109 additions and 23 deletions

View file

@ -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")

View file

@ -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