mimeext

package
v0.0.0-...-935805d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 28, 2021 License: BSD-3-Clause, MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddExtensionType

func AddExtensionType(ext, typ string) error

AddExtensionType sets the MIME type associated with the extension ext to typ. The extension should begin with a leading dot, as in ".html".

func AddTypeExtension

func AddTypeExtension(ext, typ string) error

AddExtensionType sets the extension associated associated with the MIME type typ to ext. The extension should begin with a leading dot, as in ".html".

func ExtensionByType

func ExtensionByType(typ string) string

TypeByExtension returns the extension associated with the MIME type typ. The extension ext should begin with a leading dot, as in ".html". When ext has no associated type, TypeByExtension returns "".

The built-in table is small but it is augmented by calling LoadMimeFile.

func LoadMimeFile

func LoadMimeFile(filename string, clear bool)

func TypeByExtension

func TypeByExtension(ext string) string

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 "".

The built-in table is small but it is augmented by calling LoadMimeFile.

Text types have the charset parameter set to "utf-8" by default.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL