Golang have switch..case

This commit is contained in:
Felipe Martin 2020-11-15 22:37:40 +01:00
parent dcc450d583
commit 5d64f5d035
Signed by: fmartingr
GPG Key ID: 716BC147715E716F
1 changed files with 3 additions and 2 deletions

View File

@ -41,9 +41,10 @@ func Start() {
func getGamesFromProvider(provider string) []games.Game {
var games []games.Game
if provider == "steam" {
switch provider {
case "steam":
games = append(games, steam.GetGames()...)
} else if provider == "minecraft" {
case "minecraft":
games = append(games, minecraft.GetGames()...)
}
return games