neoneo-go/cli/vm/vm.go

28 lines
519 B
Go
Raw Normal View History

package vm
import (
2021-02-10 08:53:01 +00:00
"os"
"github.com/chzyer/readline"
"github.com/nspcc-dev/neo-go/cli/cmdargs"
"github.com/urfave/cli"
)
// NewCommands returns 'vm' command.
func NewCommands() []cli.Command {
return []cli.Command{{
Name: "vm",
Usage: "start the virtual machine",
Action: startVMPrompt,
Flags: []cli.Flag{},
}}
}
func startVMPrompt(ctx *cli.Context) error {
if err := cmdargs.EnsureNone(ctx); err != nil {
return err
}
2022-10-05 09:30:54 +00:00
p := NewWithConfig(true, os.Exit, &readline.Config{})
return p.Run()
}