diff options
Diffstat (limited to 'cmd/podman/utils/error.go')
-rw-r--r-- | cmd/podman/utils/error.go | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/cmd/podman/utils/error.go b/cmd/podman/utils/error.go new file mode 100644 index 000000000..3464f0779 --- /dev/null +++ b/cmd/podman/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 +} |