style: Reformat code
This commit is contained in:
parent
1801c98866
commit
cda0a8f737
1 changed files with 2 additions and 1 deletions
3
main.go
3
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)
|
||||
|
|
Loading…
Reference in a new issue