Compare commits

...

2 Commits

Author SHA1 Message Date
e9a4d586b4
move remaining structs 2020-02-29 16:01:46 -06:00
cc6645fb48
move color code 2020-02-29 16:00:21 -06:00
2 changed files with 10 additions and 10 deletions

View File

@ -22,16 +22,6 @@ type (
}
)
const (
OK Status = "ok"
TimedOut Status = "timed_out"
Offline Status = "offline"
)
func (s Status) Success() bool {
return s == OK
}
func NewRGBColor(r, g, b uint8) (*RGBColor, error) {
return &RGBColor{R: r, G: g, B: b}, nil
}

View File

@ -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 {