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

@@ -26,7 +26,7 @@ const (
defaultDelimiter = "."
)
// A media type (also known as MIME type and content type) is a two-part identifier for
// Type (also known as MIME type and content type) is a two-part identifier for
// file formats and format contents transmitted on the Internet.
// For Hugo's use case, we use the top-level type name / subtype name + suffix.
// One example would be image/jpeg+jpg
@@ -39,7 +39,7 @@ type Type struct {
Delimiter string `json:"delimiter"` // defaults to "."
}
// FromTypeString creates a new Type given a type sring on the form MainType/SubType and
// FromString creates a new Type given a type sring on the form MainType/SubType and
// an optional suffix, e.g. "text/html" or "text/html+html".
func FromString(t string) (Type, error) {
t = strings.ToLower(t)