mirror of
https://git.seedno.de/seednode/roulette.git
synced 2025-02-14 09:17:08 +00:00
20 lines
249 B
Go
20 lines
249 B
Go
/*
|
|
Copyright © 2022 Seednode <seednode@seedno.de>
|
|
*/
|
|
|
|
package cmd
|
|
|
|
import (
|
|
"os"
|
|
)
|
|
|
|
type Exit struct{ Code int }
|
|
|
|
func HandleExit() {
|
|
if e := recover(); e != nil {
|
|
if exit, ok := e.(Exit); ok == true {
|
|
os.Exit(exit.Code)
|
|
}
|
|
panic(e)
|
|
}
|
|
}
|