This commit is contained in:
jjohnstondev 2023-01-07 08:26:52 -08:00
parent e8af8aa5e0
commit 245d95a20c
1 changed files with 4 additions and 17 deletions

View File

@ -19,29 +19,16 @@ func Run(client *spotify.Client, args []string) error {
ctx := context.Background()
switch args[0] {
case "play":
err := Play(ctx, client, args)
if err != nil {
return err
}
return Play(ctx, client, args)
case "pause":
err := Pause(ctx, client, args)
if err != nil {
return err
}
return Pause(ctx, client, args)
case "next":
err := Skip(ctx, client, args)
if err != nil {
return err
}
return Skip(ctx, client, args)
case "shuffle":
err := Shuffle(ctx, client, args)
if err != nil {
return err
}
return Shuffle(ctx, client, args)
default:
return fmt.Errorf("Unsupported Command")
}
return nil
}
func Play(ctx context.Context, client *spotify.Client, args []string) error {