From 80a4f4ab1a92c687241043ddedab291a67257150 Mon Sep 17 00:00:00 2001 From: Collin Guarino Date: Sun, 31 Jan 2016 16:36:18 -0500 Subject: Refactored error system to make sure all functions return an error if it occurs. --- light_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'light_test.go') diff --git a/light_test.go b/light_test.go index 2481c0f..b1ea862 100644 --- a/light_test.go +++ b/light_test.go @@ -17,8 +17,8 @@ func TestGetLight(t *testing.T) { func TestSetLightState(t *testing.T) { bridge := NewBridge("192.168.1.128", "319b36233bd2328f3e40731b23479207") - randomLight := GetAllLights(bridge)[0] - fmt.Println(randomLight.Name) + lights, _ := GetAllLights(bridge) + fmt.Println(lights[0].Name) newState := LightState{On: true} - SetLightState(bridge, randomLight.UniqueID, newState) + SetLightState(bridge, lights[0].UniqueID, newState) } -- cgit v1.2.3