Documentation ¶
Index ¶
- func AddExtensionType(ext, typ string) error
- func ExtensionsByType(typ string) ([]string, error)
- func FormatMediaType(t string, param map[string]string) string
- func ParseMediaType(v string) (mediatype string, params map[string]string, err error)
- func TypeByExtension(ext string) string
- type WordDecoder
- type WordEncoder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddExtensionType ¶ added in v0.2.0
AddExtensionType is not supported by this package. MIE type database is read-only.
func ExtensionsByType ¶
ExtensionsByType returns the extensions known to be associated with the MIME type typ. The returned extensions will each begin with a leading dot, as in ".html". When typ has no associated extensions, ExtensionsByType returns an nil slice.
func FormatMediaType ¶ added in v0.2.0
FormatMediaType is an alias of mime.FormatMediaType.
func ParseMediaType ¶ added in v0.2.0
ParseMediaType is an alias of mime.ParseMediaType.
func TypeByExtension ¶
TypeByExtension returns the MIME type associated with the file extension ext. The extension ext should begin with a leading dot, as in ".html". When ext has no associated type, TypeByExtension returns "".
Extensions are looked up first case-sensitively, then case-insensitively.
Text types have the charset parameter set to "utf-8" by default.
Types ¶
type WordDecoder ¶ added in v0.2.0
type WordDecoder = mime.WordDecoder
WordDecoder is an alias of mime.WordDecoder.
type WordEncoder ¶ added in v0.2.0
type WordEncoder = mime.WordEncoder
WordEncoder is an alias of mime.WordEncoder.