This library provides functions to work with MIME types (also known as "media types").
package main
import (
"github.com/zhooravell/mime"
"log"
)
func main() {
ext, _ := mime.GetExtensions("application/javascript")
log.Println(ext)
// Output: {"js", "jsm", "mjs"}
mt, _ := mime.GetMimeTypes("yml")
log.Println(mt)
// Output: {"application/x-yaml", "text/yaml", "text/x-yaml"}
}