diff --git a/client.go b/client.go index 9e591ac..04535f1 100644 --- a/client.go +++ b/client.go @@ -76,7 +76,7 @@ func (c *Client) NewRequest(method, url string, body io.Reader) (req *http.Reque return } -func (c *Client) setStateRequest(selector string, state State) (*http.Response, error) { +func (c *Client) setState(selector string, state State) (*http.Response, error) { var ( err error j []byte @@ -99,7 +99,7 @@ func (c *Client) setStateRequest(selector string, state State) (*http.Response, return resp, nil } -func (c *Client) setStatesRequest(selector string, states States) (*http.Response, error) { +func (c *Client) setStates(selector string, states States) (*http.Response, error) { var ( err error j []byte @@ -122,7 +122,7 @@ func (c *Client) setStatesRequest(selector string, states States) (*http.Respons return resp, nil } -func (c *Client) toggleRequest(selector string, duration float64) (*http.Response, error) { +func (c *Client) toggle(selector string, duration float64) (*http.Response, error) { var ( err error j []byte diff --git a/lights.go b/lights.go index bd7e915..e6a3857 100644 --- a/lights.go +++ b/lights.go @@ -98,7 +98,7 @@ func (c *Client) SetState(selector string, state State) (*Response, error) { resp *http.Response ) - if resp, err = c.setStateRequest(selector, state); err != nil { + if resp, err = c.setState(selector, state); err != nil { return nil, err } defer resp.Body.Close() @@ -126,7 +126,7 @@ func (c *Client) SetStates(selector string, states States) (*Response, error) { resp *http.Response ) - if resp, err = c.setStatesRequest(selector, states); err != nil { + if resp, err = c.setStates(selector, states); err != nil { return nil, err } defer resp.Body.Close() @@ -164,7 +164,7 @@ func (c *Client) Toggle(selector string, duration float64) (*Response, error) { resp *http.Response ) - if resp, err = c.toggleRequest(selector, duration); err != nil { + if resp, err = c.toggle(selector, duration); err != nil { return nil, err } defer resp.Body.Close()