Replace most occurrences of os.Exit(0) in the backend and sync packages with a custom backend.Exit function that can allow "soft exit" in GUI/TUI environments to avoid killing the entire process; currently all major errors still result in killing the entire process

This commit is contained in:
2024-07-05 22:18:17 -04:00
parent ec0587ba5b
commit eea4570a89
10 changed files with 31 additions and 15 deletions
+9
View File
@@ -0,0 +1,9 @@
//go:build !returnOnExit
package backend
import "os"
func Exit(code int) {
os.Exit(code)
}