From 4227bd92b5f19a79755397451f1fc8b92c59525a Mon Sep 17 00:00:00 2001 From: Dreaded_X Date: Mon, 21 Nov 2022 21:58:22 +0100 Subject: [PATCH] Url is now actually passed to the computer struct for wol --- integration/wol/computer.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/integration/wol/computer.go b/integration/wol/computer.go index 3691e0c..fabbd62 100644 --- a/integration/wol/computer.go +++ b/integration/wol/computer.go @@ -14,16 +14,19 @@ type computer struct { } func NewComputer(macAddress string, name device.InternalName, url string) *computer { - c := &computer{macAddress: macAddress, name: name} + c := &computer{macAddress, name, url} return c } func (c *computer) Activate(state bool) { if state { - http.Get(c.url) + _, err := http.Get(c.url) + if err != nil { + log.Println(err) + } } else { - // Scene does not implement this + // This is not implemented } }