Skip to content

Commit

Permalink
[3djuggler] lint
Browse files Browse the repository at this point in the history
  • Loading branch information
leoleovich committed Oct 2, 2024
1 parent 7227b57 commit df3e90a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions daemon.go
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ func (daemon *Daemon) StartHandler(w http.ResponseWriter, _ *http.Request) {
}

errS := fmt.Sprintf("Ignore buttonpress in '%v' status", daemon.job.Status)
log.Infof(errS)
log.Info(errS)
http.Error(w, errS, http.StatusBadRequest)
}

Expand All @@ -264,7 +264,7 @@ func (daemon *Daemon) RescheduleHandler(w http.ResponseWriter, _ *http.Request)

if daemon.job.Status != juggler.StatusWaitingButton {
errS := fmt.Sprintf("Ignore reschedule in '%v' status", daemon.job.Status)
log.Infof(errS)
log.Info(errS)
http.Error(w, errS, http.StatusBadRequest)
return
}
Expand All @@ -281,7 +281,7 @@ func (daemon *Daemon) CancelHandler(w http.ResponseWriter, _ *http.Request) {

if daemon.job.ID == 0 {
errS := "Ignore cancel, no job scheduled"
log.Infof(errS)
log.Info(errS)
http.Error(w, errS, http.StatusBadRequest)
return
}
Expand Down
6 changes: 3 additions & 3 deletions fakejuggler/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,19 +101,19 @@ func main() {
}
j := FakeJuggler{Job: &job}

http.HandleFunc("/cancel", func(w http.ResponseWriter, r *http.Request) {
http.HandleFunc("/cancel", func(w http.ResponseWriter, _ *http.Request) {
juggler.SetHeaders(w)
log.Println("cancel")
j.cancel()
})

http.HandleFunc("/start", func(w http.ResponseWriter, r *http.Request) {
http.HandleFunc("/start", func(w http.ResponseWriter, _ *http.Request) {
juggler.SetHeaders(w)
log.Println("start")
j.start()
})

http.HandleFunc("/reschedule", func(w http.ResponseWriter, r *http.Request) {
http.HandleFunc("/reschedule", func(w http.ResponseWriter, _ *http.Request) {
juggler.SetHeaders(w)
log.Println("reschedule")
j.reschedule()
Expand Down

0 comments on commit df3e90a

Please sign in to comment.