fix: use logger.Fatal

This commit is contained in:
Derrick Hammer 2024-01-12 06:37:11 -05:00
parent 5fbac2ae13
commit 7ccfaa57da
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 2 additions and 2 deletions

View File

@ -55,14 +55,14 @@ func (s *S5Protocol) Initialize(config *viper.Viper, logger *zap.Logger) error {
_, p, err := ed25519.GenerateKey(nil)
if err != nil {
panic(err)
logger.Fatal("Failed to generate key", zap.Error(err))
}
cfg.KeyPair = s5ed.New(p)
db, err := bolt.Open(dbPath, 0600, nil)
if err != nil {
panic(err)
logger.Fatal("Failed to open db", zap.Error(err))
}
cfg.DB = db