chore: add more tests (#3018)

This commit is contained in:
Kevin Wan
2023-03-12 20:42:50 +08:00
committed by GitHub
parent 3e093bf34e
commit 60a13f1e53
8 changed files with 107 additions and 39 deletions

View File

@@ -197,7 +197,12 @@ func Must(err error) {
msg := err.Error()
log.Print(msg)
getWriter().Severe(msg)
os.Exit(1)
if ExitOnFatal.True() {
os.Exit(1)
} else {
panic(msg)
}
}
// MustSetup sets up logging with given config c. It exits on error.