init
This commit is contained in:
18
vendor/github.com/anacrolix/missinggo/mime/mime.go
generated
vendored
Normal file
18
vendor/github.com/anacrolix/missinggo/mime/mime.go
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
package mime
|
||||
|
||||
import "strings"
|
||||
|
||||
type Type struct {
|
||||
Class string
|
||||
Specific string
|
||||
}
|
||||
|
||||
func (t Type) String() string {
|
||||
return t.Class + "/" + t.Specific
|
||||
}
|
||||
|
||||
func (t *Type) FromString(s string) {
|
||||
ss := strings.SplitN(s, "/", 1)
|
||||
t.Class = ss[0]
|
||||
t.Specific = ss[1]
|
||||
}
|
Reference in New Issue
Block a user