Begin testing expiry

This commit is contained in:
Eliot Whalan 2016-06-25 08:18:02 +10:00
parent fd46fcf753
commit 9b6150a806
No known key found for this signature in database
GPG Key ID: C0A42175139840D6
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)