Help us shape the future of Go! Take the 2026 Go Developer Survey

mime

package
v2.52.0 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2026 License: Apache-2.0 Imports: 3 Imported by: 2

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 RegisterMime

func RegisterMime(ext, mime string)

RegisterMime is a package level function that registers a mime type with the given extension. The extension is stored the way Detect looks it up, so a leading dot and upper case letters are accepted. 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