use log.Panicf instead of just panic

This commit is contained in:
Bruno Sousa
2020-04-15 16:20:09 +02:00
parent c64b4d0d39
commit e39349963b

View File

@@ -1,7 +1,6 @@
package main
import (
"fmt"
"log"
"net/http"
"os"
@@ -38,7 +37,7 @@ func main() {
// Migrate database
if err := database.MigrateDatabase(db); err != nil {
panic(fmt.Sprintf("Could not migrate database: %s\n", err))
log.Panicf("Could not migrate database: %s\n", err)
}
rootRouter := mux.NewRouter()