From 6e7575fdc2cf5d082e5d1ee6b36bdc758c152b00 Mon Sep 17 00:00:00 2001 From: adnano Date: Sat, 20 Mar 2021 16:29:06 -0400 Subject: [PATCH] config: Remove mediatypes --- config.go | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/config.go b/config.go index a9ec01f..8bad627 100644 --- a/config.go +++ b/config.go @@ -1,7 +1,6 @@ package main import ( - "mime" "os" "text/template" @@ -10,11 +9,10 @@ import ( // Config contains site configuration. type Config struct { - Title string `toml:"title"` // site title - URLs []string `toml:"urls"` // site URLs - Feeds map[string]string `toml:"feeds"` // site feeds - Mediatypes map[string][]string `toml:"mediatypes"` // mediatypes - Templates *Templates `toml:"-"` // site templates + Title string `toml:"title"` // site title + URLs []string `toml:"urls"` // site URLs + Feeds map[string]string `toml:"feeds"` // site feeds + Templates *Templates `toml:"-"` // site templates } // LoadConfig loads the configuration from the provided path. @@ -30,13 +28,6 @@ func LoadConfig(path string) (*Config, error) { return nil, err } - // Register media types - for typ, exts := range c.Mediatypes { - for _, ext := range exts { - mime.AddExtensionType(typ, ext) - } - } - return c, nil }