From 9536560b4f3a38fbba4ac61c357dd3627fb6cf4e Mon Sep 17 00:00:00 2001 From: Brent Baude Date: Sat, 21 Mar 2020 13:47:07 -0500 Subject: podmanv2 add core container commands add core container commands for podmanv2: kill, pause, restart, rm, stop, unpause Signed-off-by: Brent Baude --- cmd/podmanV2/utils/error.go | 16 ++++++++++++++++ cmd/podmanV2/utils/remote.go | 10 ++++++++++ 2 files changed, 26 insertions(+) create mode 100644 cmd/podmanV2/utils/error.go create mode 100644 cmd/podmanV2/utils/remote.go (limited to 'cmd/podmanV2/utils') diff --git a/cmd/podmanV2/utils/error.go b/cmd/podmanV2/utils/error.go new file mode 100644 index 000000000..3464f0779 --- /dev/null +++ b/cmd/podmanV2/utils/error.go @@ -0,0 +1,16 @@ +package utils + +import "fmt" + +type OutputErrors []error + +func (o OutputErrors) PrintErrors() (lastError error) { + if len(o) == 0 { + return + } + lastError = o[len(o)-1] + for e := 0; e < len(o)-1; e++ { + fmt.Println(o[e]) + } + return +} diff --git a/cmd/podmanV2/utils/remote.go b/cmd/podmanV2/utils/remote.go new file mode 100644 index 000000000..d0c8a272d --- /dev/null +++ b/cmd/podmanV2/utils/remote.go @@ -0,0 +1,10 @@ +package utils + +import ( + "github.com/containers/libpod/cmd/podmanV2/registry" + "github.com/containers/libpod/pkg/domain/entities" +) + +func IsRemote() bool { + return registry.EngineOpts.EngineMode == entities.TunnelMode +} -- cgit v1.2.3-54-g00ecf