From abfd442ab58bcd596eb4487b53e442738e0b18cc Mon Sep 17 00:00:00 2001 From: adnano Date: Sat, 27 Feb 2021 21:45:37 -0500 Subject: [PATCH] config: Add mediatypes section --- config.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/config.go b/config.go index 59359f8..315db5a 100644 --- a/config.go +++ b/config.go @@ -1,6 +1,7 @@ package main import ( + "mime" "os" "strings" "text/template" @@ -42,6 +43,10 @@ func (c *Config) Load(path string) error { } case "feeds": c.Feeds[key] = value + case "mediatypes": + for _, field := range strings.Fields(value) { + mime.AddExtensionType(key, field) + } } }) }