From ffa6db5c283bdd5f2f3fc683534246730e2fd55f Mon Sep 17 00:00:00 2001 From: Felipe M Date: Tue, 5 Jan 2021 23:17:47 +0100 Subject: [PATCH] switch: Added platform name as constant --- pkg/providers/nintendo_switch/switch.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/providers/nintendo_switch/switch.go b/pkg/providers/nintendo_switch/switch.go index 1ed8eb4..427ee0b 100644 --- a/pkg/providers/nintendo_switch/switch.go +++ b/pkg/providers/nintendo_switch/switch.go @@ -14,6 +14,7 @@ import ( ) const providerName = "nintendo-switch" +const platformName = "Nintendo Switch" const gameListURL = "https://fmartingr.github.io/switch-games-json/switch_id_names.json" type SwitchGame struct { @@ -68,7 +69,7 @@ func addScreenshotToGame(userGames []games.Game, switchGame SwitchGame, screensh } if foundGame.ID == "" { - foundGame := games.Game{Name: switchGame.Name, ID: switchGame.EncryptedGameID, Platform: "Nintendo Switch", Provider: providerName} + foundGame := games.Game{Name: switchGame.Name, ID: switchGame.EncryptedGameID, Platform: platformName, Provider: providerName} foundGame.Screenshots = append(foundGame.Screenshots, screenshot) userGames = append(userGames, foundGame) }