From 25a3923b61a5ca014318e6d957f68abd03947297 Mon Sep 17 00:00:00 2001 From: baude Date: Thu, 31 Jan 2019 13:20:04 -0600 Subject: Migrate to cobra CLI We intend to migrate to the cobra cli from urfave/cli because the project is more well maintained. There are also some technical reasons as well which extend into our remote client work. Signed-off-by: baude --- libpod/adapter/runtime.go | 4 ++-- libpod/adapter/runtime_remote.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'libpod') diff --git a/libpod/adapter/runtime.go b/libpod/adapter/runtime.go index 2c408dd2f..46771b5b6 100644 --- a/libpod/adapter/runtime.go +++ b/libpod/adapter/runtime.go @@ -11,11 +11,11 @@ import ( "strconv" "github.com/containers/image/types" + "github.com/containers/libpod/cmd/podman/cliconfig" "github.com/containers/libpod/cmd/podman/libpodruntime" "github.com/containers/libpod/libpod" "github.com/containers/libpod/libpod/image" "github.com/containers/libpod/pkg/rootless" - "github.com/urfave/cli" ) // LocalRuntime describes a typical libpod runtime @@ -35,7 +35,7 @@ type Container struct { } // GetRuntime returns a LocalRuntime struct with the actual runtime embedded in it -func GetRuntime(c *cli.Context) (*LocalRuntime, error) { +func GetRuntime(c *cliconfig.PodmanCommand) (*LocalRuntime, error) { runtime, err := libpodruntime.GetRuntime(c) if err != nil { return nil, err diff --git a/libpod/adapter/runtime_remote.go b/libpod/adapter/runtime_remote.go index c73e98c95..f754aaee6 100644 --- a/libpod/adapter/runtime_remote.go +++ b/libpod/adapter/runtime_remote.go @@ -14,12 +14,12 @@ import ( "time" "github.com/containers/image/types" + "github.com/containers/libpod/cmd/podman/cliconfig" "github.com/containers/libpod/cmd/podman/varlink" "github.com/containers/libpod/libpod" "github.com/containers/libpod/libpod/image" "github.com/opencontainers/go-digest" "github.com/sirupsen/logrus" - "github.com/urfave/cli" "github.com/varlink/go/varlink" ) @@ -38,7 +38,7 @@ type LocalRuntime struct { } // GetRuntime returns a LocalRuntime struct with the actual runtime embedded in it -func GetRuntime(c *cli.Context) (*LocalRuntime, error) { +func GetRuntime(c *cliconfig.PodmanCommand) (*LocalRuntime, error) { runtime := RemoteRuntime{} conn, err := runtime.Connect() if err != nil { -- cgit v1.2.3-54-g00ecf