aboutsummaryrefslogtreecommitdiffhomepage
path: root/media
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <[email protected]>2020-07-21 17:59:03 +0200
committerBjørn Erik Pedersen <[email protected]>2020-07-22 10:13:30 +0200
commit0256959a358bb26b983c9d9496862b0fdf387621 (patch)
tree35578577001fb8bf330cae72195251cd73ce777d /media
parenteded9ac2a05b9a7244c25c70ca8f761b69b33385 (diff)
downloadhugo-0256959a358bb26b983c9d9496862b0fdf387621.tar.gz
hugo-0256959a358bb26b983c9d9496862b0fdf387621.zip
resources/js: Add option for setting bundle format
Fixes #7503
Diffstat (limited to 'media')
-rw-r--r--media/mediaType.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/media/mediaType.go b/media/mediaType.go
index 8a2efc4a4..21d4ddca5 100644
--- a/media/mediaType.go
+++ b/media/mediaType.go
@@ -378,6 +378,11 @@ func DecodeTypes(mms ...map[string]interface{}) (Types, error) {
return m, nil
}
+// IsZero reports whether this Type represents a zero value.
+func (m Type) IsZero() bool {
+ return m.SubType == ""
+}
+
// MarshalJSON returns the JSON encoding of m.
func (m Type) MarshalJSON() ([]byte, error) {
type Alias Type