mirror of
https://github.com/gohugoio/hugo.git
synced 2025-04-27 06:00:25 +03:00
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:
parent
9891c0fb0e
commit
81c13171a9
30 changed files with 109 additions and 23 deletions
|
@ -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")
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue