Golang have switch..case
This commit is contained in:
parent
dcc450d583
commit
5d64f5d035
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue