Begin testing expiry
This commit is contained in:
parent
fd46fcf753
commit
9b6150a806
5
main.go
5
main.go
|
@ -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)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue