Begin testing expiry

This commit is contained in:
Eliot Whalan 2016-06-25 08:18:02 +10:00
parent 7dd331178d
commit 22c61cdcef
1 changed files with 3 additions and 2 deletions

View File

@ -252,8 +252,9 @@ func highlight(s string, lang string) (string, error) {
func getPaste(paste string, lang string) (string, string) { func getPaste(paste string, lang string) (string, string) {
param1 := html.EscapeString(paste) param1 := html.EscapeString(paste)
db, err := sql.Open("mysql", DATABASE) db, err := sql.Open("mysql", DATABASE)
var title, s string var title, s, expiry string
err = db.QueryRow("select title, data from pastebin where id=?", param1).Scan(&title, &s) err = db.QueryRow("select title, data, expiry from pastebin where id=?", param1).Scan(&title, &s, &expiry)
fmt.Println(expiry)
db.Close() db.Close()
check(err) check(err)