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: 181 modules, 177 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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