Url is now actually passed to the computer struct for wol
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
301551596a
commit
4227bd92b5
|
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Reference in New Issue
Block a user