diff options
author | Jan Christophersen <jan@ruken.pw> | 2015-12-19 19:33:45 (UTC) |
---|---|---|
committer | Jan Christophersen <jan@ruken.pw> | 2015-12-19 19:33:45 (UTC) |
commit | 173a7213b19665ce0bccfb0f97c1606d95f52c46 (patch) | |
tree | 3e76a0734d46f312ad37ebfb149f63faedc8f04e | |
parent | 07df855ee43b3b82c45855cc0a07b45bff05dc10 (diff) |
datenbank pingen bevor wir feuchtfröhlich berichten, wir haben eine verbindung, auch wenn das gar nicht der Fall ist.
-rw-r--r-- | main.go | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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") |