Declare previously undeclared variable

This commit is contained in:
Eliot Whalan 2016-08-10 19:12:42 +10:00
parent 9a0d625da4
commit ea2e485638
1 changed files with 1 additions and 1 deletions

View File

@ -91,7 +91,7 @@ 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)
query, err := db.Query("select id from pastebin where id=?", id)
if err != sql.ErrNoRows {
for query.Next() {
GenerateName()