This commit is contained in:
jjohnstondev 2023-01-07 08:26:52 -08:00
parent e8af8aa5e0
commit 245d95a20c

View File

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