File: mime.go

package info (click to toggle)
golang-gopkg-h2non-filetype.v1 1.0.5%2Bds1-2.1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, bullseye-backports
  • size: 172 kB
  • sloc: makefile: 4
file content (14 lines) | stat: -rw-r--r-- 278 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
package types

// MIME stores the file MIME type values
type MIME struct {
	Type    string
	Subtype string
	Value   string
}

// Creates a new MIME type
func NewMIME(mime string) MIME {
	kind, subtype := splitMime(mime)
	return MIME{Type: kind, Subtype: subtype, Value: mime}
}