forked from TrueCloudLab/distribution
Define error type
Signed-off-by: Troels Thomsen <troels@thomsen.io>
This commit is contained in:
parent
d309bce2d1
commit
e2b4b426b4
1 changed files with 11 additions and 0 deletions
11
errors.go
11
errors.go
|
@ -89,3 +89,14 @@ type ErrManifestBlobUnknown struct {
|
||||||
func (err ErrManifestBlobUnknown) Error() string {
|
func (err ErrManifestBlobUnknown) Error() string {
|
||||||
return fmt.Sprintf("unknown blob %v on manifest", err.Digest)
|
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)
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue