filetype: Index | Files

package types

import ""


Package Files

defaults.go mime.go split.go type.go types.go


var Types = make(map[string]Type)
var Unknown = NewType("unknown", "")

Unknown default type

type MIME Uses

type MIME struct {
    Type    string
    Subtype string
    Value   string

MIME stores the file MIME type values

func NewMIME Uses

func NewMIME(mime string) MIME

Creates a new MIME type

type Type Uses

type Type struct {
    MIME      MIME
    Extension string

Type represents a file MIME type and its extension

func Add Uses

func Add(t Type) Type

Add registers a new type in the package

func Get Uses

func Get(ext string) Type

Get retrieves a Type by extension

func NewType Uses

func NewType(ext, mime string) Type

NewType creates a new Type

Package types imports 1 packages (graph) and is imported by 27 packages. Updated 2019-03-07. Refresh now. Tools for package owners.