Remove ineffectual assignment to err

This commit is contained in:
Adalricus Ovicula 2020-02-02 23:33:34 +05:30
parent 63cec1ffdc
commit 5bd1a40cf1
Signed by: adalricus
GPG Key ID: C7DC4679EC6CE92D
1 changed files with 2 additions and 2 deletions

View File

@ -76,7 +76,7 @@ func sURLH(w http.ResponseWriter, r *http.Request) {
defer stmt.Close()
var shortURL string
err = stmt.QueryRow(url).Scan(&shortURL)
_ = stmt.QueryRow(url).Scan(&shortURL)
// If short url doesn't exist then create it
if len(shortURL) == 0 {
@ -114,7 +114,7 @@ func urlH(w http.ResponseWriter, r *http.Request) {
errChk(err)
var url string
err = stmt.QueryRow(shortURL).Scan(&url)
_ = stmt.QueryRow(shortURL).Scan(&url)
if len(url) != 0 {
http.Redirect(w, r, url, http.StatusSeeOther)