util: create a NewErrSnapNameConflict function

The NewErrSnapNameConflict will allow packages outside of "util" to
create new instances of the ErrSnapNameConflict error.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
This commit is contained in:
John Mulligan 2020-04-23 14:27:50 -04:00 committed by mergify[bot]
parent 3b608f130a
commit 22d1476bba

View File

@ -57,6 +57,10 @@ func (e ErrSnapNameConflict) Error() string {
return e.err.Error()
}
func NewErrSnapNameConflict(name string, err error) ErrSnapNameConflict {
return ErrSnapNameConflict{name, err}
}
// ErrPoolNotFound is returned when pool is not found
type ErrPoolNotFound struct {
Pool string