libs/os: remove arbitrary os.Exit (#7284)

I think calling os.Exit at arbitrary points is _bad_ and is good to
delete. I think panics in the case of data courruption have a chance
of providing useful information.
This commit is contained in:
Sam Kleinman
2021-11-15 14:25:29 -05:00
committed by GitHub
parent a15ae5b53a
commit 2a455be46c
4 changed files with 22 additions and 26 deletions

View File

@@ -29,11 +29,6 @@ func TrapSignal(logger logger, cb func()) {
}()
}
func Exit(s string) {
fmt.Printf(s + "\n")
os.Exit(1)
}
// EnsureDir ensures the given directory exists, creating it if necessary.
// Errors if the path already exists as a non-directory.
func EnsureDir(dir string, mode os.FileMode) error {