about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEmile <hanemile@protonmail.com>2019-10-21 12:48:00 +0200
committerEmile <hanemile@protonmail.com>2019-10-21 12:48:00 +0200
commit22d7d2b3101ce238b09e18f74e329d55382aa066 (patch)
tree1e594b68f8a465bddc9b941d51438ed6db522e70
parenta2be5112ba26dabbb932f4eef336d7bab768a6de (diff)
handle errors
-rw-r--r--src/main.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/main.go b/src/main.go
index 4af5cc4..c13d00c 100644
--- a/src/main.go
+++ b/src/main.go
@@ -26,7 +26,12 @@ func main() {
 	httpServer := setupHTTPServer()
 
 	// Set up the DB connection
-	db = setupDatabase()
+	database, err := setupDatabase()
+	if err != nil {
+		log.Println(err)
+		return
+	}
+	db = database
 
 	// React to system signals
 	signalChannel := make(chan os.Signal, 1)