From a94b7e208dc9bf73b9d10cc45cb6f9970627ee4a Mon Sep 17 00:00:00 2001 From: Seednode Date: Wed, 13 Sep 2023 23:32:02 -0500 Subject: [PATCH] Remove html from text handler, add yaml/toml/sh/ps1 --- cmd/root.go | 2 +- types/text/text.go | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/cmd/root.go b/cmd/root.go index 96dae4a..1d506c3 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -12,7 +12,7 @@ import ( ) const ( - ReleaseVersion string = "0.81.0" + ReleaseVersion string = "0.82.0" ) var ( diff --git a/types/text/text.go b/types/text/text.go index 8a16e7c..f9f37f0 100644 --- a/types/text/text.go +++ b/types/text/text.go @@ -46,23 +46,27 @@ func (t Format) Extensions() map[string]string { return map[string]string{ `.css`: `text/css`, `.csv`: `text/csv`, - `.htm`: `text/html`, - `.html`: `text/html`, `.js`: `text/javascript`, `.json`: `application/json`, `.md`: `text/markdown`, + `.ps1`: `text/plain`, + `.sh`: `application./x-sh`, + `.toml`: `application/toml`, `.txt`: `text/plain`, `.xml`: `application/xml`, + `.yml`: `application/yaml`, + `.yaml`: `application/yaml`, } } func (t Format) MimeTypes() []string { return []string{ `application/json`, + `application/toml`, `application/xml`, + `application/yaml`, `text/css`, `text/csv`, - `text/html`, `text/javascript`, `text/plain`, `text/plain; charset=utf-8`,