From 3cf7387c12ff9f454b0419f7f5b0d426d2be575d Mon Sep 17 00:00:00 2001 From: Octopus Octopus Date: Tue, 25 Feb 2025 14:51:29 -0600 Subject: [PATCH] remove unneeded assignment --- main.go | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/main.go b/main.go index 03893b5..d85d13b 100644 --- a/main.go +++ b/main.go @@ -32,28 +32,20 @@ func main() { log.Fatalf("Authentication failed, password %v absent or incorrect.", password) } defer client.Disconnect() - params := sceneitems.NewGetSceneItemListParams().WithSceneName("cmus") - scil, err := client.SceneItems.GetSceneItemList(params) + cmusParams := sceneitems.NewGetSceneItemListParams().WithSceneName("cmus") + scil, err := client.SceneItems.GetSceneItemList(cmusParams) if err != nil { // i should force create the scene if it does not exist. but this is solely for me. // failing in this way is probably smarter since it forces to arrange the scene how i want it. log.Fatalf("Expecting a scene named \"cmus\", but the scene was not found.\n%v", err.Error()) } - out, err := CmusRemoteOutput() - if err != nil { - log.Fatalf("%v\nCmus is likely not running.", err.Error()) - } - path, err := getAttribute(out, "file ") - if err != nil { - log.Fatal(err.Error()) - } var prevPath string for { - out, err = CmusRemoteOutput() + out, err := CmusRemoteOutput() if err != nil { log.Fatalf("%v\nCmus is likely not running.", err.Error()) } - path, err = getAttribute(out, "file ") + path, err := getAttribute(out, "file ") if err != nil { log.Fatal(err.Error()) }