Add some temps prints for debugging

This commit is contained in:
Eliot Whalan 2016-06-25 08:40:51 +10:00
parent 985565b348
commit eb13a51303
1 changed files with 3 additions and 0 deletions

View File

@ -255,6 +255,9 @@ func getPaste(paste string, lang string) (string, string) {
var expiry string var expiry string
err = db.QueryRow("select title, data, expiry from pastebin where id=?", param1).Scan(&title, &s, &expiry) err = db.QueryRow("select title, data, expiry from pastebin where id=?", param1).Scan(&title, &s, &expiry)
check(err) check(err)
fmt.Println(expiry)
fmt.Println(time.Now().Format(time.RFC3339))
fmt.Println(expiry > time.Now().Format(time.RFC3339))
if expiry > time.Now().Format(time.RFC3339) { if expiry > time.Now().Format(time.RFC3339) {
stmt, err := db.Prepare("delete from pastebin where id=?") stmt, err := db.Prepare("delete from pastebin where id=?")
check(err) check(err)