types

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2021 License: MIT Imports: 2 Imported by: 148

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Types sync.Map

Types Support concurrent map writes

View Source
var Unknown = NewType("unknown", "")

Unknown default type

Functions

This section is empty.

Types

type MIME

type MIME struct {
	Type    string
	Subtype string
	Value   string
}

MIME stores the file MIME type values

func NewMIME

func NewMIME(mime string) MIME

Creates a new MIME type

type Type

type Type struct {
	MIME      MIME
	Extension string
}

Type represents a file MIME type and its extension

func Add

func Add(t Type) Type

Add registers a new type in the package

func Get

func Get(ext string) Type

Get retrieves a Type by extension

func NewType

func NewType(ext, mime string) Type

NewType creates a new Type

Jump to

Keyboard shortcuts

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