YTSFlix_Go/vendor/gopkg.in/h2non/filetype.v1/types/type.go
2018-11-04 15:58:15 +01:00

17 lines
271 B
Go

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)
}