0g-chain/cmd/0gchaind/main.go
2024-08-03 19:36:47 +08:00

25 lines
384 B
Go

package main
import (
"os"
"github.com/cosmos/cosmos-sdk/server"
svrcmd "github.com/cosmos/cosmos-sdk/server/cmd"
"github.com/0glabs/0g-chain/app"
)
func main() {
rootCmd := NewRootCmd()
if err := svrcmd.Execute(rootCmd, EnvPrefix, app.DefaultNodeHome); err != nil {
switch e := err.(type) {
case server.ErrorCode:
os.Exit(e.Code)
default:
os.Exit(1)
}
}
}