From 5ec28c44f24a07b64519d5fbfbd704c9b545fb55 Mon Sep 17 00:00:00 2001 From: sentriz Date: Thu, 30 May 2019 14:50:01 +0100 Subject: [PATCH] use empty struct instead of bool for set --- scanner/utilities.go | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/scanner/utilities.go b/scanner/utilities.go index 2fa0b80..682bcf8 100644 --- a/scanner/utilities.go +++ b/scanner/utilities.go @@ -27,19 +27,19 @@ func isTrack(fullPath string) (string, string, bool) { return mine, ext, true } -var coverFilenames = map[string]bool{ - "cover.png": true, - "cover.jpg": true, - "cover.jpeg": true, - "folder.png": true, - "folder.jpg": true, - "folder.jpeg": true, - "album.png": true, - "album.jpg": true, - "album.jpeg": true, - "front.png": true, - "front.jpg": true, - "front.jpeg": true, +var coverFilenames = map[string]struct{}{ + "cover.png": struct{}{}, + "cover.jpg": struct{}{}, + "cover.jpeg": struct{}{}, + "folder.png": struct{}{}, + "folder.jpg": struct{}{}, + "folder.jpeg": struct{}{}, + "album.png": struct{}{}, + "album.jpg": struct{}{}, + "album.jpeg": struct{}{}, + "front.png": struct{}{}, + "front.jpg": struct{}{}, + "front.jpeg": struct{}{}, } func isCover(fullPath string) bool {