remove unneeded assignment
This commit is contained in:
parent
4e4c6b3d69
commit
3cf7387c12
16
main.go
16
main.go
|
@ -32,28 +32,20 @@ func main() {
|
||||||
log.Fatalf("Authentication failed, password %v absent or incorrect.", password)
|
log.Fatalf("Authentication failed, password %v absent or incorrect.", password)
|
||||||
}
|
}
|
||||||
defer client.Disconnect()
|
defer client.Disconnect()
|
||||||
params := sceneitems.NewGetSceneItemListParams().WithSceneName("cmus")
|
cmusParams := sceneitems.NewGetSceneItemListParams().WithSceneName("cmus")
|
||||||
scil, err := client.SceneItems.GetSceneItemList(params)
|
scil, err := client.SceneItems.GetSceneItemList(cmusParams)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
// i should force create the scene if it does not exist. but this is solely for me.
|
// 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.
|
// 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())
|
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
|
var prevPath string
|
||||||
for {
|
for {
|
||||||
out, err = CmusRemoteOutput()
|
out, err := CmusRemoteOutput()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatalf("%v\nCmus is likely not running.", err.Error())
|
log.Fatalf("%v\nCmus is likely not running.", err.Error())
|
||||||
}
|
}
|
||||||
path, err = getAttribute(out, "file ")
|
path, err := getAttribute(out, "file ")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal(err.Error())
|
log.Fatal(err.Error())
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue