summaryrefslogtreecommitdiff
path: root/cmd/podmanV2/utils/error.go
blob: 3464f0779c2aa1a5d701f7877fd6a5c573dda15b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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
}