diff options
author | Collin Guarino <collin.guarino@gmail.com> | 2016-02-08 22:25:17 -0500 |
---|---|---|
committer | Collin Guarino <collin.guarino@gmail.com> | 2016-02-08 22:25:17 -0500 |
commit | 2f3b850a28e8d6640a063ca238a56dd9550e654c (patch) | |
tree | 87ef07786ce6fcb44f1a647063fdfea57a8e1655 /light.go | |
parent | e7deedcd248dbc89623db252dcf2b0559d944abb (diff) |
Fixed light on/off toggle to return error.
Diffstat (limited to 'light.go')
-rw-r--r-- | light.go | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -62,11 +62,11 @@ func (self *Light) On() error { } // light.Toggle will toggle the light source on and off -func (self *Light) Toggle() { +func (self *Light) Toggle() error { if self.State.On { - self.Off() + return self.Off() } else { - self.On() + return self.On() } } |