Remove unneeded variable
This commit is contained in:
parent
13fa84be3a
commit
7d9133008a
|
@ -90,11 +90,9 @@ func GenerateName() string {
|
|||
Check(err)
|
||||
defer db.Close()
|
||||
// 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 {
|
||||
for query.Next() {
|
||||
GenerateName()
|
||||
}
|
||||
GenerateName()
|
||||
}
|
||||
|
||||
return id
|
||||
|
|
Loading…
Reference in New Issue