diff --git a/lights.go b/lights.go index 3b0dbd8..e551809 100644 --- a/lights.go +++ b/lights.go @@ -7,6 +7,12 @@ import ( "fmt" ) +const ( + OK Status = "ok" + TimedOut Status = "timed_out" + Offline Status = "offline" +) + type ( Status string @@ -34,6 +40,10 @@ type ( } ) +func (s Status) Success() bool { + return s == OK +} + func (c *Client) SetState(selector string, state State) ([]Result, error) { j, err := json.Marshal(state) if err != nil { diff --git a/structs.go b/structs.go deleted file mode 100644 index f465310..0000000 --- a/structs.go +++ /dev/null @@ -1,11 +0,0 @@ -package lifx - -const ( - OK Status = "ok" - TimedOut Status = "timed_out" - Offline Status = "offline" -) - -func (s Status) Success() bool { - return s == OK -}