From f7b2f4703846a01b490f3cc70b4f373396a2570a Mon Sep 17 00:00:00 2001 From: Eliot Whalan Date: Sun, 19 Jun 2016 16:49:22 +1000 Subject: [PATCH] Correct return list --- main.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index aa3a0a9..e891ff8 100644 --- a/main.go +++ b/main.go @@ -81,11 +81,12 @@ func save(raw []byte) []string { sha := hash(p) query, err := db.Query("select id, hash, data, delkey from pastebin") for query.Next() { + url := ADDRESS + "/p/" + id var id, hash, paste, delkey string err := query.Scan(&id, &hash, &paste, &delkey) check(err) if hash == sha { - return []string{id, hash, paste, delkey} + return []string{id, hash, url paste, delkey} } } id := generateName()