Commit 14130351 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent e0b19d5d
...@@ -100,6 +100,10 @@ type programExit struct { ...@@ -100,6 +100,10 @@ type programExit struct {
} }
// Main is the main entry point for the program. Call it from main. // Main is the main entry point for the program. Call it from main.
//
// Do not call os.Exit or log.Fatal from your program. Instead use Exit and
// Fatal from zodbtools package so that deferred functions setup by Main could
// be run.
func (prog *MainProg) Main() { func (prog *MainProg) Main() {
// handle exit throw-requests // handle exit throw-requests
defer func() { defer func() {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment