mirror of
https://github.com/planetmint/planetmint-go.git
synced 2025-03-30 15:08:28 +00:00

* [linter] Remove unused exclusions Linter `nosnakecase` was removed in 1e1138d0268a9896a1bd058e9b65b808eb20666e. * [linter] Add tool for code clone detection * [linter] Add `errorlint` Find code that will cause problems with the error wrapping scheme introduced in Go 1.13. * [linter] Add `exhaustive` Check exhaustiveness of enum switch statements. * [linter] Add `forcetypeassert` Finds type assertions which did forcely such as below: ``` func f() { var a interface{} _ = a.(int) // type assertion must be checked } ``` * [linter] Add `gocritic` Provides diagnostics that check for bugs, performance and style issues. Signed-off-by: Julian Strobl <jmastr@mailbox.org>
24 lines
451 B
Go
24 lines
451 B
Go
package main
|
|
|
|
import (
|
|
"errors"
|
|
"os"
|
|
|
|
"github.com/cosmos/cosmos-sdk/server"
|
|
svrcmd "github.com/cosmos/cosmos-sdk/server/cmd"
|
|
|
|
"github.com/planetmint/planetmint-go/app"
|
|
"github.com/planetmint/planetmint-go/cmd/planetmint-god/cmd"
|
|
)
|
|
|
|
func main() {
|
|
rootCmd, _ := cmd.NewRootCmd()
|
|
if err := svrcmd.Execute(rootCmd, "", app.DefaultNodeHome); err != nil {
|
|
var e *server.ErrorCode
|
|
if errors.As(err, &e) {
|
|
os.Exit(e.Code)
|
|
}
|
|
os.Exit(1)
|
|
}
|
|
}
|