@@ -208,7 +208,51 @@ func TestExtensionsByType2(t *testing.T) {
208
208
typ string
209
209
want []string
210
210
}{
211
- {typ : "image/jpeg" , want : []string {".jpeg" , ".jpg" }},
211
+ {typ : "application/postscript" , want : []string {".ai" , ".eps" , ".ps" }},
212
+ {typ : "application/vnd.android.package-archive" , want : []string {".apk" }},
213
+ {typ : "image/apng" , want : []string {".apng" }},
214
+ {typ : "image/avif" , want : []string {".avif" }},
215
+ {typ : "application/octet-stream" , want : []string {".bin" , ".com" , ".exe" }},
216
+ {typ : "image/bmp" , want : []string {".bmp" }},
217
+ {typ : "text/css; charset=utf-8" , want : []string {".css" }},
218
+ {typ : "text/csv; charset=utf-8" , want : []string {".csv" }},
219
+ {typ : "application/msword" , want : []string {".doc" }},
220
+ {typ : "application/vnd.openxmlformats-officedocument.wordprocessingml.document" , want : []string {".docx" }},
221
+ {typ : "text/html; charset=utf-8" , want : []string {".ehtml" , ".htm" , ".html" , ".shtml" }},
222
+ {typ : "message/rfc822" , want : []string {".eml" }},
223
+ {typ : "audio/flac" , want : []string {".flac" }},
224
+ {typ : "image/gif" , want : []string {".gif" }},
225
+ {typ : "application/gzip" , want : []string {".gz" }},
226
+ {typ : "image/vnd.microsoft.icon" , want : []string {".ico" }},
227
+ {typ : "text/calendar; charset=utf-8" , want : []string {".ics" }},
228
+ {typ : "image/jpeg" , want : []string {".jfif" , ".jpeg" , ".jpg" , ".pjp" , ".pjpeg" }},
229
+ {typ : "text/javascript; charset=utf-8" , want : []string {".js" , ".mjs" }},
230
+ {typ : "application/json" , want : []string {".json" }},
231
+ {typ : "audio/mp4" , want : []string {".m4a" }},
232
+ {typ : "audio/mpeg" , want : []string {".mp3" }},
233
+ {typ : "video/mp4" , want : []string {".mp4" }},
234
+ {typ : "audio/ogg" , want : []string {".oga" , ".ogg" , ".opus" }},
235
+ {typ : "video/ogg" , want : []string {".ogv" }},
236
+ {typ : "application/pdf" , want : []string {".pdf" }},
237
+ {typ : "image/png" , want : []string {".png" }},
238
+ {typ : "application/vnd.ms-powerpoint" , want : []string {".ppt" }},
239
+ {typ : "application/vnd.openxmlformats-officedocument.presentationml.presentation" , want : []string {".pptx" }},
240
+ {typ : "application/rdf+xml" , want : []string {".rdf" }},
241
+ {typ : "application/rtf" , want : []string {".rtf" }},
242
+ {typ : "image/svg+xml" , want : []string {".svg" }},
243
+ {typ : "text/plain; charset=utf-8" , want : []string {".text" , ".txt" }},
244
+ {typ : "image/tiff" , want : []string {".tif" , ".tiff" }},
245
+ {typ : "text/vtt; charset=utf-8" , want : []string {".vtt" }},
246
+ {typ : "application/wasm" , want : []string {".wasm" }},
247
+ {typ : "audio/wav" , want : []string {".wav" }},
248
+ {typ : "audio/webm" , want : []string {".webm" }},
249
+ {typ : "image/webp" , want : []string {".webp" }},
250
+ {typ : "text/xml; charset=utf-8" , want : []string {".xbl" , ".xml" , ".xsl" }},
251
+ {typ : "image/x-xbitmap" , want : []string {".xbm" }},
252
+ {typ : "application/xhtml+xml" , want : []string {".xht" , ".xhtml" }},
253
+ {typ : "application/vnd.ms-excel" , want : []string {".xls" }},
254
+ {typ : "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" , want : []string {".xlsx" }},
255
+ {typ : "application/zip" , want : []string {".zip" }},
212
256
}
213
257
214
258
for _ , tt := range tests {
0 commit comments