mirror of
https://github.com/containers/skopeo.git
synced 2025-09-22 18:37:21 +00:00
9
vendor/github.com/docker/distribution/registry/api/errcode/errors.go
generated
vendored
9
vendor/github.com/docker/distribution/registry/api/errcode/errors.go
generated
vendored
@@ -69,6 +69,15 @@ func (ec *ErrorCode) UnmarshalText(text []byte) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// WithMessage creates a new Error struct based on the passed-in info and
|
||||
// overrides the Message property.
|
||||
func (ec ErrorCode) WithMessage(message string) Error {
|
||||
return Error{
|
||||
Code: ec,
|
||||
Message: message,
|
||||
}
|
||||
}
|
||||
|
||||
// WithDetail creates a new Error struct based on the passed-in info and
|
||||
// set the Detail property appropriately
|
||||
func (ec ErrorCode) WithDetail(detail interface{}) Error {
|
||||
|
Reference in New Issue
Block a user