mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-28 22:19:59 +02:00
Clean up lint in various packages
Changes fall into one of the following: - gofmt -s - receiver name is inconsistent - omit unused 2nd value from range - godoc comment formed incorrectly - err assigned and not used - if block ends with a return statement followed by else
This commit is contained in:
committed by
Bjørn Erik Pedersen
parent
d45e358a05
commit
47fdfd5196
@@ -189,15 +189,15 @@ func DecodeTypes(maps ...map[string]interface{}) (Types, error) {
|
||||
return m, nil
|
||||
}
|
||||
|
||||
func (t Type) MarshalJSON() ([]byte, error) {
|
||||
func (m Type) MarshalJSON() ([]byte, error) {
|
||||
type Alias Type
|
||||
return json.Marshal(&struct {
|
||||
Type string `json:"type"`
|
||||
String string `json:"string"`
|
||||
Alias
|
||||
}{
|
||||
Type: t.Type(),
|
||||
String: t.String(),
|
||||
Alias: (Alias)(t),
|
||||
Type: m.Type(),
|
||||
String: m.String(),
|
||||
Alias: (Alias)(m),
|
||||
})
|
||||
}
|
||||
|
Reference in New Issue
Block a user