config: Add mediatypes section

This commit is contained in:
adnano 2021-02-27 21:45:37 -05:00
parent 13b9b8c520
commit abfd442ab5

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