neoneo-go/cli/main.go

36 lines
869 B
Go
Raw Normal View History

2018-01-26 18:04:13 +00:00
package main
import (
"os"
2018-01-26 18:04:13 +00:00
"github.com/nspcc-dev/neo-go/cli/server"
"github.com/nspcc-dev/neo-go/cli/smartcontract"
2020-08-04 06:40:06 +00:00
"github.com/nspcc-dev/neo-go/cli/util"
"github.com/nspcc-dev/neo-go/cli/vm"
"github.com/nspcc-dev/neo-go/cli/wallet"
"github.com/nspcc-dev/neo-go/pkg/config"
"github.com/urfave/cli"
2018-01-26 18:04:13 +00:00
)
func main() {
ctl := newApp()
if err := ctl.Run(os.Args); err != nil {
panic(err)
}
}
func newApp() *cli.App {
ctl := cli.NewApp()
ctl.Name = "neo-go"
ctl.Version = config.Version
ctl.Usage = "Official Go client for Neo"
2018-01-26 18:04:13 +00:00
ctl.Commands = append(ctl.Commands, server.NewCommands()...)
ctl.Commands = append(ctl.Commands, smartcontract.NewCommands()...)
ctl.Commands = append(ctl.Commands, wallet.NewCommands()...)
ctl.Commands = append(ctl.Commands, vm.NewCommands()...)
2020-08-04 06:40:06 +00:00
ctl.Commands = append(ctl.Commands, util.NewCommands()...)
return ctl
2018-01-26 18:04:13 +00:00
}