From 67889ad474c30f52a83b17db5331e15addc628f9 Mon Sep 17 00:00:00 2001 From: Grail Finder Date: Sat, 5 Apr 2025 15:15:01 +0300 Subject: refactor: clean up imports and formatting in main.go --- internal/handlers/main.go | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'internal/handlers/main.go') 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 { -- cgit v1.2.3