refactor: move shared packages up a level

This commit is contained in:
sentriz
2022-04-13 00:09:10 +01:00
parent 165904c2bb
commit 8b803ecf20
53 changed files with 65 additions and 68 deletions

16
mime/mime.go Normal file
View File

@@ -0,0 +1,16 @@
package mime
func FromExtension(ext string) (string, bool) {
types := map[string]string{
"mp3": "audio/mpeg",
"flac": "audio/x-flac",
"aac": "audio/x-aac",
"m4a": "audio/m4a",
"m4b": "audio/m4b",
"ogg": "audio/ogg",
"opus": "audio/ogg",
"wma": "audio/x-ms-wma",
}
v, ok := types[ext]
return v, ok
}