forked from jaswdr/faker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mimetype.go
69 lines (66 loc) · 1.45 KB
/
mimetype.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
package faker
var (
mimeType = []string{
"audio/aac",
"application/x-abiword",
"application/octet-stream",
"video/x-msvideo",
"application/vnd.amazon.ebook",
"application/octet-stream",
"application/x-bzip",
"application/x-bzip2",
"application/x-csh",
"text/css",
"text/csv",
"application/msword",
"application/epub+zip",
"image/gif",
"text/html",
"image/x-icon",
"text/calendar",
"application/java-archive",
"image/jpeg",
"application/javascript",
"application/json",
"audio/midi",
"video/mpeg",
"application/vnd.apple.installer+xml",
"application/vnd.oasis.opendocument.presentation",
"application/vnd.oasis.opendocument.spreadsheet",
"application/vnd.oasis.opendocument.text",
"audio/ogg",
"video/ogg",
"application/ogg",
"application/pdf",
"application/vnd.ms-powerpoint",
"application/x-rar-compressed",
"application/rtf",
"application/x-sh",
"image/svg+xml",
"application/x-shockwave-flash",
"application/x-tar",
"image/tiff",
"font/ttf",
"application/vnd.visio",
"audio/x-wav",
"audio/webm",
"video/webm",
"image/webp",
"font/woff",
"font/woff2",
"application/xhtml+xml",
"application/vnd.ms-excel",
"application/xml",
"application/vnd.mozilla.xul+xml",
"application/zip",
"video/3gpp",
"video/3gpp2",
"application/x-7z-compressed",
}
)
type MimeType struct {
Faker *Faker
}
func (p MimeType) MimeType() string {
return p.Faker.RandomStringElement(mimeType)
}