use empty struct instead of bool for set

This commit is contained in:
sentriz
2019-05-30 14:50:01 +01:00
parent 47c4743682
commit 5ec28c44f2

View File

@@ -27,19 +27,19 @@ func isTrack(fullPath string) (string, string, bool) {
return mine, ext, true return mine, ext, true
} }
var coverFilenames = map[string]bool{ var coverFilenames = map[string]struct{}{
"cover.png": true, "cover.png": struct{}{},
"cover.jpg": true, "cover.jpg": struct{}{},
"cover.jpeg": true, "cover.jpeg": struct{}{},
"folder.png": true, "folder.png": struct{}{},
"folder.jpg": true, "folder.jpg": struct{}{},
"folder.jpeg": true, "folder.jpeg": struct{}{},
"album.png": true, "album.png": struct{}{},
"album.jpg": true, "album.jpg": struct{}{},
"album.jpeg": true, "album.jpeg": struct{}{},
"front.png": true, "front.png": struct{}{},
"front.jpg": true, "front.jpg": struct{}{},
"front.jpeg": true, "front.jpeg": struct{}{},
} }
func isCover(fullPath string) bool { func isCover(fullPath string) bool {