From 84839b09c254b6ff48fdba5679aa2e9fdcde472f Mon Sep 17 00:00:00 2001 From: Leonard Lyubich Date: Thu, 17 Dec 2020 12:50:36 +0300 Subject: [PATCH] [#208] pkg/container: Define standard error for mismatch identifiers Signed-off-by: Leonard Lyubich --- pkg/container/id.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/container/id.go b/pkg/container/id.go index bdf3f8e..3ab170c 100644 --- a/pkg/container/id.go +++ b/pkg/container/id.go @@ -12,6 +12,10 @@ import ( // ID represents v2-compatible container identifier. type ID refs.ContainerID +// ErrIDMismatch is returned when container structure does not match +// a specific identifier. +var ErrIDMismatch = errors.New("container structure does not match the identifier") + var errInvalidIDString = errors.New("incorrect format of the string container ID") // NewIDFromV2 wraps v2 ContainerID message to ID.