about summary refs log tree commit diff
path: root/src/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.go')
-rw-r--r--src/main.go10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/main.go b/src/main.go
index 38f254c..4af5cc4 100644
--- a/src/main.go
+++ b/src/main.go
@@ -1,8 +1,8 @@
 package main
 
 import (
+	"database/sql"
 	"flag"
-	"fmt"
 	"log"
 	"net/http"
 	"os"
@@ -11,6 +11,10 @@ import (
 	_ "github.com/lib/pq"
 )
 
+var (
+	db *sql.DB
+)
+
 func main() {
 	// Set up flags
 	log.Println("Setting up components")
@@ -22,9 +26,7 @@ func main() {
 	httpServer := setupHTTPServer()
 
 	// Set up the DB connection
-	db := setupDatabase()
-	name := getName(db)
-	fmt.Println(name)
+	db = setupDatabase()
 
 	// React to system signals
 	signalChannel := make(chan os.Signal, 1)