diff options
author | Emile <hanemile@protonmail.com> | 2019-10-21 12:48:00 +0200 |
---|---|---|
committer | Emile <hanemile@protonmail.com> | 2019-10-21 12:48:00 +0200 |
commit | 22d7d2b3101ce238b09e18f74e329d55382aa066 (patch) | |
tree | 1e594b68f8a465bddc9b941d51438ed6db522e70 /src | |
parent | a2be5112ba26dabbb932f4eef336d7bab768a6de (diff) |
handle errors
Diffstat (limited to 'src')
-rw-r--r-- | src/main.go | 7 |
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) |