From e9a4d586b44248cb91f958b3417e3df7567ac7c3 Mon Sep 17 00:00:00 2001 From: Ryan Cavicchioni Date: Sat, 29 Feb 2020 16:01:46 -0600 Subject: [PATCH] move remaining structs --- lights.go | 10 ++++++++++ structs.go | 11 ----------- 2 files changed, 10 insertions(+), 11 deletions(-) delete mode 100644 structs.go 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 -}