From 8cbeb1109f003257d9fde0e8d11a6d198f312c66 Mon Sep 17 00:00:00 2001 From: Djeeberjr Date: Tue, 10 May 2022 12:48:54 +0200 Subject: [PATCH] error log in startup --- internal/s3Share.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/internal/s3Share.go b/internal/s3Share.go index fe98a62..2463a70 100644 --- a/internal/s3Share.go +++ b/internal/s3Share.go @@ -6,24 +6,25 @@ import ( "git.kapelle.org/niklas/s3share/internal/s3" "git.kapelle.org/niklas/s3share/internal/types" "git.kapelle.org/niklas/s3share/internal/web" + "github.com/sirupsen/logrus" ) func Start(config *types.AppConfig) { db, err := db.NewSqlLiteDB("foo.db") if err != nil { - panic(err) + logrus.Fatal(err.Error()) } s3Client, err := s3.NewMinio(config.S3Endpoint, config.S3Bucket, config.S3AccessKey, config.S3SecretKey, config.S3SSL) if err != nil { - panic(err) + logrus.Fatal(err.Error()) } client := client.NewClient(db, s3Client) err = web.StartWebserver(config.Address, *client) if err != nil { - panic(err) + logrus.Fatal(err.Error()) } }