YTSFlix_Go/vendor/gopkg.in/h2non/filetype.v1/types/type.go

17 lines
271 B
Go
Raw Normal View History

2018-11-04 14:58:15 +00:00
package types
// Type represents a file MIME type and its extension
type Type struct {
MIME MIME
Extension string
}
// NewType creates a new Type
func NewType(ext, mime string) Type {
t := Type{
MIME: NewMIME(mime),
Extension: ext,
}
return Add(t)
}