From 0b717b0c228424809ee63e370230c32481efdee4 Mon Sep 17 00:00:00 2001 From: Anna Shaleva Date: Wed, 5 Oct 2022 12:30:54 +0300 Subject: [PATCH] vm: move vm CLI to cli/vm package --- cli/util/convert.go | 2 +- {pkg/vm/cli => cli/vm}/cli.go | 2 +- {pkg/vm/cli => cli/vm}/cli_test.go | 4 ++-- cli/vm/vm.go | 3 +-- 4 files changed, 5 insertions(+), 6 deletions(-) rename {pkg/vm/cli => cli/vm}/cli.go (99%) rename {pkg/vm/cli => cli/vm}/cli_test.go (99%) diff --git a/cli/util/convert.go b/cli/util/convert.go index 2f75be9bd..1fb910216 100644 --- a/cli/util/convert.go +++ b/cli/util/convert.go @@ -4,7 +4,7 @@ import ( "fmt" "github.com/nspcc-dev/neo-go/cli/options" - vmcli "github.com/nspcc-dev/neo-go/pkg/vm/cli" + vmcli "github.com/nspcc-dev/neo-go/cli/vm" "github.com/urfave/cli" ) diff --git a/pkg/vm/cli/cli.go b/cli/vm/cli.go similarity index 99% rename from pkg/vm/cli/cli.go rename to cli/vm/cli.go index ae848670a..f7f210966 100644 --- a/pkg/vm/cli/cli.go +++ b/cli/vm/cli.go @@ -1,4 +1,4 @@ -package cli +package vm import ( "bytes" diff --git a/pkg/vm/cli/cli_test.go b/cli/vm/cli_test.go similarity index 99% rename from pkg/vm/cli/cli_test.go rename to cli/vm/cli_test.go index 98f6afacb..b49e4e274 100644 --- a/pkg/vm/cli/cli_test.go +++ b/cli/vm/cli_test.go @@ -1,4 +1,4 @@ -package cli +package vm import ( "bytes" @@ -251,7 +251,7 @@ go 1.17`) require ( github.com/nspcc-dev/neo-go/pkg/interop v0.0.0 ) -replace github.com/nspcc-dev/neo-go/pkg/interop => ` + filepath.Join(wd, "../../interop") + ` +replace github.com/nspcc-dev/neo-go/pkg/interop => ` + filepath.Join(wd, "../../pkg/interop") + ` go 1.17`) require.NoError(t, os.WriteFile(filepath.Join(tmpDir, "go.mod"), goMod, os.ModePerm)) diff --git a/cli/vm/vm.go b/cli/vm/vm.go index 860a4ad02..a5faf4441 100644 --- a/cli/vm/vm.go +++ b/cli/vm/vm.go @@ -5,7 +5,6 @@ import ( "github.com/chzyer/readline" "github.com/nspcc-dev/neo-go/cli/cmdargs" - vmcli "github.com/nspcc-dev/neo-go/pkg/vm/cli" "github.com/urfave/cli" ) @@ -23,6 +22,6 @@ func startVMPrompt(ctx *cli.Context) error { if err := cmdargs.EnsureNone(ctx); err != nil { return err } - p := vmcli.NewWithConfig(true, os.Exit, &readline.Config{}) + p := NewWithConfig(true, os.Exit, &readline.Config{}) return p.Run() }