log.Fatal already do Exit(1)
authornemunaire <nemunaire@nemunai.re>
Sat, 25 Jun 2016 14:42:35 +0000 (16:42 +0200)
committerPierre-Olivier Mercier <nemunaire@nemunai.re>
Thu, 13 Oct 2016 17:56:31 +0000 (19:56 +0200)
admin/main.go
backend/main.go

index 14c7048634206e4299039a62bc3a3bd1aad2b3e4..a5b1f02f0e94648f4726f91dff2e17896716054e 100644 (file)
@@ -36,38 +36,29 @@ func main() {
        log.Println("Checking paths...")
        if staticDir, err = filepath.Abs("./static/"); err != nil {
                log.Fatal(err)
-               os.Exit(1)
        }
        if fic.FilesDir, err = filepath.Abs(fic.FilesDir); err != nil {
                log.Fatal(err)
-               os.Exit(1)
        }
        if PKIDir, err = filepath.Abs(PKIDir); err != nil {
                log.Fatal(err)
-               os.Exit(1)
        }
        if SubmissionDir, err = filepath.Abs(SubmissionDir); err != nil {
                log.Fatal(err)
-               os.Exit(1)
        }
        if fic.FilesDir, err = filepath.Abs(fic.FilesDir); err != nil {
                log.Fatal(err)
-               os.Exit(1)
        }
 
        log.Println("Opening database...")
        if err := fic.DBInit(fmt.Sprintf("%s?parseTime=true", *dsn)); err != nil {
                log.Fatal("Cannot open the database: ", err)
-               os.Exit(1)
-
        }
        defer fic.DBClose()
 
        log.Println("Creating database...")
        if err := fic.DBCreate(); err != nil {
                log.Fatal("Cannot create database: ", err)
-               os.Exit(1)
-
        }
 
        os.Chdir(PKIDir)
index b0945e5ca3be56ae64a066b394149291e350b0a5..df9659c2b1c9497a13bfdaff9faa1f98f945263a 100644 (file)
@@ -62,8 +62,6 @@ func main() {
        log.Println("Opening DB...")
        if err := fic.DBInit(fmt.Sprintf("%s?parseTime=true", *dsn)); err != nil {
                log.Fatal("Cannot open the database: ", err)
-               os.Exit(1)
-
        }
        defer fic.DBClose()