From f911b107ef32c1c4369aa252a790e3c933660135 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Sat, 1 Apr 2017 15:12:31 +0200 Subject: media, output: Add CSV type and format And make CSS correclty behave as plain text. --- media/mediaType.go | 1 + media/mediaType_test.go | 1 + 2 files changed, 2 insertions(+) (limited to 'media') 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"}, -- cgit v1.2.3