mime is a simple Go package that extends the mime package from the
standard library with:
- A
mime.Typetype, that represents a MIME Type - A
mime.DefaultExtensionfunction, which returns an extension given amime.Type
package main
import (
"fmt"
"github.com/litl/mime"
)
func main() {
t := mime.Type("video/x-matroska")
fmt.Printf("Type %s has default extension %s\n", t, t.DefaultExtension())
}