aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Christophersen <jan@ruken.pw>2015-12-19 19:33:45 (UTC)
committerJan Christophersen <jan@ruken.pw>2015-12-19 19:33:45 (UTC)
commit173a7213b19665ce0bccfb0f97c1606d95f52c46 (patch)
tree3e76a0734d46f312ad37ebfb149f63faedc8f04e
parent07df855ee43b3b82c45855cc0a07b45bff05dc10 (diff)
datenbank pingen bevor wir feuchtfröhlich berichten, wir haben eine verbindung, auch wenn das gar nicht der Fall ist.
-rw-r--r--main.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/main.go b/main.go
index b7c6e49..863dd3a 100644
--- a/main.go
+++ b/main.go
@@ -24,6 +24,10 @@ func main() {
24 if err != nil { 24 if err != nil {
25 log.Fatal(err) 25 log.Fatal(err)
26 } 26 }
27 if err := db.Ping(); err != nil {
28 log.Fatal(err)
29 }
30
27 log.Println("database connection established") 31 log.Println("database connection established")
28 32
29 renderer = frontend.New("views") 33 renderer = frontend.New("views")