From e2b4b426b4e3b291c90302d967c6a864ff01b008 Mon Sep 17 00:00:00 2001 From: Troels Thomsen Date: Tue, 1 Dec 2015 22:21:22 +0100 Subject: [PATCH] Define error type Signed-off-by: Troels Thomsen --- errors.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/errors.go b/errors.go index eb332d1b..7bf720e0 100644 --- a/errors.go +++ b/errors.go @@ -89,3 +89,14 @@ type ErrManifestBlobUnknown struct { func (err ErrManifestBlobUnknown) Error() string { return fmt.Sprintf("unknown blob %v on manifest", err.Digest) } + +// ErrManifestNameInvalid should be used to denote an invalid manifest +// name. Reason may set, indicating the cause of invalidity. +type ErrManifestNameInvalid struct { + Name string + Reason error +} + +func (err ErrManifestNameInvalid) Error() string { + return fmt.Sprintf("manifest name %q invalid: %v", err.Name, err.Reason) +}