Remove unneeded variable
This commit is contained in:
parent
13fa84be3a
commit
7d9133008a
|
@ -90,11 +90,9 @@ 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
|
||||||
|
|
Loading…
Reference in New Issue