mirror of
https://github.com/rwinkhart/libmutton.git
synced 2026-08-30 22:06:32 -04:00
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:
@@ -35,7 +35,7 @@ func ParseConfig(readKeys []string, missingValueError string) []string {
|
||||
case "":
|
||||
fmt.Println(AnsiError + "Failed to find value for key \"" + key + "\" in section \"[LIBMUTTON]\" in libmutton.ini" + AnsiReset)
|
||||
case "0":
|
||||
os.Exit(0)
|
||||
Exit(0)
|
||||
default:
|
||||
fmt.Println(AnsiError + missingValueError + AnsiReset)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user