From cda0a8f73722a857c09296b8b4b0dcb66e50649b Mon Sep 17 00:00:00 2001 From: ptrcnull Date: Tue, 11 Apr 2023 01:55:25 +0200 Subject: [PATCH] style: Reformat code --- main.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index 53c1cf1..d5108dc 100644 --- a/main.go +++ b/main.go @@ -12,6 +12,7 @@ import ( "time" "database/sql" + "github.com/asaskevich/govalidator" _ "github.com/lib/pq" ) @@ -143,7 +144,7 @@ func (h *Handler) RedirectHandler(wr http.ResponseWriter, req *http.Request) { } go func() { - _, _ = h.db.Exec(`UPDATE urls SET hits = $1 WHERE code = $2`, hits + 1, code) + _, _ = h.db.Exec(`UPDATE urls SET hits = $1 WHERE code = $2`, hits+1, code) }() wr.Header().Set("Location", url)