From b39e67e2fbd59f2073927c82d335e737cb0673e0 Mon Sep 17 00:00:00 2001 From: Eliot Whalan Date: Sun, 19 Jun 2016 16:31:36 +1000 Subject: [PATCH] Change all databases to mysql --- main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index 3172236..37f49c2 100644 --- a/main.go +++ b/main.go @@ -77,7 +77,7 @@ func hash(paste []byte) string { func save(raw []byte) []string { p := raw[86 : len(raw)-46] - db, err := sql.Open("sqlite3", "./database.db") + db, err := sql.Open("mysql", DATABASE) check(err) sha := hash(p) @@ -160,7 +160,7 @@ func langHandler(w http.ResponseWriter, r *http.Request) { func getPaste(paste string) string { param1 := html.EscapeString(paste) - db, err := sql.Open("sqlite3", "./database.db") + db, err := sql.Open("mysql", DATABASE) var s string err = db.QueryRow("select data from pastebin where id=?", param1).Scan(&s) db.Close()