config: Add mediatypes section

This commit is contained in:
Adnan Maolood 2021-02-27 21:45:37 -05:00
parent faae5cc44d
commit b6bc412de4

View file

@ -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)
}
}
})
}