From: Bjørn Erik Pedersen Date: Mon, 31 Jul 2017 14:53:13 +0000 (+0200) Subject: media: Add missing JSON tags to Type X-Git-Tag: v0.26~14 X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=6acbe41f0abaaa63478f24ad4111829be993bbfe;p=brevno-suite%2Fhugo media: Add missing JSON tags to Type See https://github.com/gohugoio/hugoDocs/issues/114 --- diff --git a/media/mediaType.go b/media/mediaType.go index 59de655b..8946a9e8 100644 --- a/media/mediaType.go +++ b/media/mediaType.go @@ -192,8 +192,8 @@ func DecodeTypes(maps ...map[string]interface{}) (Types, error) { func (t Type) MarshalJSON() ([]byte, error) { type Alias Type return json.Marshal(&struct { - Type string - String string + Type string `json:"type"` + String string `json:"string"` Alias }{ Type: t.Type(),