aboutsummaryrefslogtreecommitdiff
path: root/light.go
diff options
context:
space:
mode:
authorCollin Guarino <Collinux@users.noreply.github.com>2016-11-09 14:38:51 -0500
committerGitHub <noreply@github.com>2016-11-09 14:38:51 -0500
commit23e6757464bf225f806b2ba586597af6d83c9609 (patch)
tree83b0441a0b0a0c9f02f0ddd2d7ef96afa55323f3 /light.go
parent541bfc66cb1dd94c9ab4d7089adc0f31a77799d4 (diff)
parenta712f307fe27070aa449452091553acf85e3d8f8 (diff)
Merge pull request #6 from inhies/master
Added Go Report Card score to README and fixed issues lowering score related to formatting
Diffstat (limited to 'light.go')
-rw-r--r--light.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/light.go b/light.go
index fc1229e..fcf54fe 100644
--- a/light.go
+++ b/light.go
@@ -88,7 +88,6 @@ func (light *Light) Toggle() error {
} else {
return light.On()
}
- return nil
}
// Light.Delete removes the light from the
@@ -185,7 +184,7 @@ func (light *Light) Dim(percent int) error {
newBri := uint8(originalBri - uint8(decreaseBri))
if newBri < 0 {
newBri = 0
- log.Println("Light.Dim state set under 0%, setting brightness to 0. ")
+ log.Printf("Light.Dim state set under 0%%, setting brightness to 0. ")
}
lightState := LightState{On: true, Bri: newBri}
err := light.SetState(lightState)
@@ -222,7 +221,7 @@ func (light *Light) Brighten(percent int) error {
newBri := uint8(originalBri + uint8(increaseBri))
if newBri > 254 { // LightState.Bri must be between 1 and 254 inclusive
newBri = 254
- log.Println("Light.Brighten state set over 100%, setting brightness to 100%. ")
+ log.Printf("Light.Brighten state set over 100%%, setting brightness to 100%%. ")
}
lightState := LightState{On: true, Bri: newBri}
err := light.SetState(lightState)