Remove unneeded variable

This commit is contained in:
Eliot Whalan 2016-08-10 19:01:30 +10:00
parent 13fa84be3a
commit 7d9133008a
1 changed files with 2 additions and 4 deletions

View File

@ -90,12 +90,10 @@ func GenerateName() string {
Check(err) Check(err)
defer db.Close() defer db.Close()
// query database if id exists and if it does call generateName again // query database if id exists and if it does call generateName again
query, err := db.Query("select id from pastebin where id=?", id) _, err = db.Query("select id from pastebin where id=?", id)
if err != sql.ErrNoRows { if err != sql.ErrNoRows {
for query.Next() {
GenerateName() GenerateName()
} }
}
return id return id