mime

package
v1.28.0 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2024 License: Apache-2.0 Imports: 4 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Detect

func Detect(isDir bool, fn string) string

Detect returns the mimetype associated with the given filename.

func GetFileExts added in v0.0.23

func GetFileExts(mime string) []string

GetFileExts performs the inverse resolution from mimetype to file extensions.

func RegisterMime

func RegisterMime(ext, mime string)

RegisterMime is a package level function that registers a mime type with the given extension. TODO(labkode): check that we do not override mime type mappings?

Types

This section is empty.

Jump to

Keyboard shortcuts

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