mirror of
https://github.com/moby/moby.git
synced 2026-08-09 01:21:37 +00:00
libnetwork: remove ErrInvalidID
It was only returned in a few places, and not used any different than a "invalid parameter" error, so let's use a standard errdefs.ErrInvalidParameter Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
@@ -14,17 +14,6 @@ func (nsn ErrNoSuchNetwork) Error() string {
|
||||
// NotFound denotes the type of this error
|
||||
func (nsn ErrNoSuchNetwork) NotFound() {}
|
||||
|
||||
// ErrInvalidID is returned when a query-by-id method is being invoked
|
||||
// with an empty id parameter
|
||||
type ErrInvalidID string
|
||||
|
||||
func (ii ErrInvalidID) Error() string {
|
||||
return fmt.Sprintf("invalid id: %s", string(ii))
|
||||
}
|
||||
|
||||
// InvalidParameter denotes the type of this error
|
||||
func (ii ErrInvalidID) InvalidParameter() {}
|
||||
|
||||
// ErrInvalidName is returned when a query-by-name or resource create method is
|
||||
// invoked with an empty name parameter
|
||||
type ErrInvalidName string
|
||||
|
||||
Reference in New Issue
Block a user