Go to file
Nick Thomas e8af1d6598
Introduce versioning
2018-03-07 00:01:49 +00:00
cmd/generate Initial commit 2018-03-06 23:56:21 +00:00
LICENSE Initial commit 2018-03-06 23:56:21 +00:00
README.md Introduce versioning 2018-03-07 00:01:49 +00:00
VERSION Introduce versioning 2018-03-07 00:01:49 +00:00
generated_mime_types.go Run go generate 2018-03-06 23:56:56 +00:00
mimedb.go Initial commit 2018-03-06 23:56:21 +00:00
mimedb_test.go Initial commit 2018-03-06 23:56:21 +00:00



This Go package uses generators to convert this database into additions to the stdlib mime package.

Since all the work is done at compile time, the MIME types end up embedded in the binary, loading them on startup is fast, and you still get sensible results when /etc/mime.types is unavailable on your platform!

This work is somewhat inspired by mime-ext-go, which lacks the automatic generation (and so easy update) to be found in this package.

The version of the mime-db package used is tracked in the VERSION file, and updates will be given a corresponding tag.