diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2017-04-01 15:12:31 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2017-04-01 15:12:31 +0200 |
commit | f911b107ef32c1c4369aa252a790e3c933660135 (patch) | |
tree | e1ac6996be0cc65eff325fb2ff12723fc73605a3 /media | |
parent | 05949c903817b93dd7fd71211260db625180eed6 (diff) |
media, output: Add CSV type and format
And make CSS correclty behave as plain text.
Diffstat (limited to 'media')
-rw-r--r-- | media/mediaType.go | 1 | ||||
-rw-r--r-- | media/mediaType_test.go | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/media/mediaType.go b/media/mediaType.go index f6597fdb6..a6ba873eb 100644 --- a/media/mediaType.go +++ b/media/mediaType.go @@ -49,6 +49,7 @@ func (m Type) String() string { var ( CalendarType = Type{"text", "calendar", "ics"} CSSType = Type{"text", "css", "css"} + CSVType = Type{"text", "csv", "csv"} HTMLType = Type{"text", "html", "html"} JavascriptType = Type{"application", "javascript", "js"} JSONType = Type{"application", "json", "json"} diff --git a/media/mediaType_test.go b/media/mediaType_test.go index 7636af59c..e918b9393 100644 --- a/media/mediaType_test.go +++ b/media/mediaType_test.go @@ -30,6 +30,7 @@ func TestDefaultTypes(t *testing.T) { }{ {CalendarType, "text", "calendar", "ics", "text/calendar", "text/calendar+ics"}, {CSSType, "text", "css", "css", "text/css", "text/css+css"}, + {CSVType, "text", "csv", "csv", "text/csv", "text/csv+csv"}, {HTMLType, "text", "html", "html", "text/html", "text/html+html"}, {JavascriptType, "application", "javascript", "js", "application/javascript", "application/javascript+js"}, {JSONType, "application", "json", "json", "application/json", "application/json+json"}, |