fix: remove ununsed return statements in keyhandler()
This commit is contained in:
parent
bbc9977f1c
commit
4f9bd664a3
2 changed files with 1 additions and 6 deletions
|
@ -20,23 +20,19 @@ func keyhandler(conn *ws.Conn, config ChronoTomato.Config, message *GoTomato.Ser
|
|||
case "space":
|
||||
if !message.Ongoing {
|
||||
websocket.SendCmd(conn, config.Password, "start")
|
||||
return false, nil
|
||||
break
|
||||
}
|
||||
if message.Paused {
|
||||
websocket.SendCmd(conn, config.Password, "resume")
|
||||
return false, nil
|
||||
} else {
|
||||
websocket.SendCmd(conn, config.Password, "pause")
|
||||
return false, nil
|
||||
}
|
||||
case "s":
|
||||
websocket.SendCmd(conn, config.Password, "stop")
|
||||
return false, nil
|
||||
case "r":
|
||||
if config.PomodoroConfig != (GoTomato.GoTomatoPomodoroConfig{}) {
|
||||
websocket.Send_updateSettings(conn, config.Password, config.PomodoroConfig)
|
||||
}
|
||||
return false, nil
|
||||
case "q":
|
||||
quit <- true
|
||||
return true, nil
|
||||
|
|
|
@ -9,7 +9,6 @@ import (
|
|||
|
||||
func sendClientCommand(conn *websocket.Conn, msg GoTomato.ClientCommand) {
|
||||
messageBytes, err := json.Marshal(msg)
|
||||
|
||||
if err != nil {
|
||||
log.Error("Error marshalling!", "reason", err)
|
||||
return
|
||||
|
|
Loading…
Reference in a new issue