Unused arguments was removed
This commit is contained in:
@@ -10,7 +10,7 @@ import (
|
|||||||
"strconv"
|
"strconv"
|
||||||
)
|
)
|
||||||
|
|
||||||
func sendCommand(n *noolite.NooliteAdapter, command string, channel, value, r, g, b int) error {
|
func sendCommand(command string, channel, value, r, g, b int) error {
|
||||||
if channel == -1 {
|
if channel == -1 {
|
||||||
return errors.New("Channel was not set")
|
return errors.New("Channel was not set")
|
||||||
}
|
}
|
||||||
@@ -94,7 +94,7 @@ func main() {
|
|||||||
flag.Parse()
|
flag.Parse()
|
||||||
|
|
||||||
if *http_port < 0 {
|
if *http_port < 0 {
|
||||||
err := sendCommand(n, *command, *channel, *value, *red, *green, *blue)
|
err := sendCommand(*command, *channel, *value, *red, *green, *blue)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
@@ -103,7 +103,7 @@ func main() {
|
|||||||
http.HandleFunc("/noolite/", func(w http.ResponseWriter, r *http.Request) {
|
http.HandleFunc("/noolite/", func(w http.ResponseWriter, r *http.Request) {
|
||||||
command, channel, value, red, green, blue := parseParams(r.URL.Path[1:])
|
command, channel, value, red, green, blue := parseParams(r.URL.Path[1:])
|
||||||
|
|
||||||
err := sendCommand(n, command, channel, value, red, green, blue)
|
err := sendCommand(command, channel, value, red, green, blue)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Fprintf(w, "{\"error\": %q}", err)
|
fmt.Fprintf(w, "{\"error\": %q}", err)
|
||||||
|
|||||||
Reference in New Issue
Block a user