mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-20 21:31:32 +02: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:
committed by
Bjørn Erik Pedersen
parent
9891c0fb0e
commit
81c13171a9
@@ -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)
|
||||
|
Reference in New Issue
Block a user