diff options
author | Grail Finder <wohilas@gmail.com> | 2025-04-05 15:15:01 +0300 |
---|---|---|
committer | Grail Finder (aider) <wohilas@gmail.com> | 2025-04-05 15:15:01 +0300 |
commit | 67889ad474c30f52a83b17db5331e15addc628f9 (patch) | |
tree | dabc3d398447e8262b23d331e5e354107df4356c | |
parent | b737b1ff0f72a23c90ae70b68b135f104e643a10 (diff) |
refactor: clean up imports and formatting in main.go
-rw-r--r-- | internal/handlers/main.go | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/internal/handlers/main.go b/internal/handlers/main.go index ce894c2..3b44d49 100644 --- a/internal/handlers/main.go +++ b/internal/handlers/main.go @@ -1,15 +1,14 @@ package handlers import ( - "fmt" - "strconv" "demoon/config" - "demoon/internal/database/repos" + "demoon/internal/database/repos" "demoon/internal/models" "html/template" "log/slog" "net/http" "os" + "strconv" ) // Handlers structure @@ -54,8 +53,8 @@ func (h *Handlers) HandleAnswer(w http.ResponseWriter, r *http.Request) { return } - h.log.Info("answer received", - "selected", selectedIndex, + h.log.Info("answer received", + "selected", selectedIndex, "question_id", questionID) question, err := h.repo.DBGetQuestion(questionID) @@ -121,10 +120,10 @@ func (h *Handlers) MainPage(w http.ResponseWriter, r *http.Request) { Option4: "Habt", CorrectIndex: 1, Requirement: "Choose the correct verb form", - Explanation: "Use 'Hast' for 2nd person singular", - Status: 0, - ExamID: 1, - MixedID: 101, + Explanation: "Use 'Hast' for 2nd person singular", + Status: 0, + ExamID: 1, + MixedID: 101, } err = tmpl.ExecuteTemplate(w, "main", testQuestion) if err != nil { |