Do not use os.Exit in exportable packages (#286)

Fixes #285

Signed-off-by: David Cassany <dcassany@suse.com>
This commit is contained in:
David Cassany Viladomat
2022-01-12 08:57:41 +01:00
committed by GitHub
parent 4943ed6aef
commit 881bf03c3d
6 changed files with 9 additions and 10 deletions

View File

@@ -17,7 +17,6 @@ package logger
import (
"fmt"
"os"
"path"
"regexp"
"runtime"
@@ -253,7 +252,7 @@ func (l *Logger) Tracef(t string, args ...interface{}) {
func (l *Logger) Fatal(args ...interface{}) {
l.send(log.LevelFatal, "", args...)
os.Exit(1)
panic("fatal error")
}
func (l *Logger) Info(args ...interface{}) {