Documentation ¶
Overview ¶
MIME (Content Type) database. The stdlib MIME package relies on OS to have the list, so the results are inconsistent (f.ex. on stock Alpine Linux it doesn't even recognize JSON)
Index ¶
Constants ¶
View Source
const ( OctetStream = "application/octet-stream" NoFallback = "" )
Variables ¶
This section is empty.
Functions ¶
func ExtensionByType ¶
image/jpeg => jpg
func TypeByExtension ¶
Supports: - ".json" - "json" - "JSON" - "JsOn"
Types ¶
type Spec ¶
type Spec struct { Extensions []string `json:"extensions"` Compressible *bool `json:"compressible"` // nil if unknown CharEncoding string `json:"charset"` // not always recorded Source string `json:"source"` }
JSON tags are defined due to importing in code generation phase, but please do not rely on those (don't JSON-marshal this spec)
type Type ¶
type Type string
const ( TypeApplication Type = "application" TypeAudio Type = "audio" TypeExample Type = "example" TypeFont Type = "font" TypeImage Type = "image" TypeMessage Type = "message" TypeModel Type = "model" TypeMultipart Type = "multipart" TypeText Type = "text" TypeVideo Type = "video" )
taken from https://en.wikipedia.org/wiki/Media_type
Click to show internal directories.
Click to hide internal directories.