dhulihan / go-mime-type

A simple CLI tool that prints golang's interpretation of a file's mime type (as recognized by http.DetectContentType).

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

About

A simple CLI tool that prints golang's interpretation of a file's mime type (as recognized by http.DetectContentType).


Languages

Language:Go 100.0%