mirror of
https://github.com/karust/openserp.git
synced 2026-08-05 16:53:54 +08:00
24 lines
311 B
Go
24 lines
311 B
Go
package main
|
|
|
|
import (
|
|
"os"
|
|
|
|
"github.com/karust/openserp/cmd"
|
|
"github.com/sirupsen/logrus"
|
|
)
|
|
|
|
func main() {
|
|
defer recoverPanic()
|
|
|
|
if err := cmd.RootCmd.Execute(); err != nil {
|
|
logrus.Info(err)
|
|
os.Exit(1)
|
|
}
|
|
}
|
|
|
|
func recoverPanic() {
|
|
if r := recover(); r != nil {
|
|
logrus.Fatalf("Error: %v\n", r)
|
|
}
|
|
}
|