go-mime-type
A simple CLI tool that prints mime type, as recognized by http.DetectContentType.
Install
go install github.com/dhulihan/go-mime-type
Usage
go-mime-type <path>
Example:
$ go-mime-type my-file.opus
application/ogg
Why?
Go's http.DetectContentType
often disagrees with other mime type detection tools (eg: file --mime-type
), so this tool helps you identify those disagreements.