mirror of
https://github.com/moby/moby.git
synced 2026-08-08 09:01:44 +00:00
libnetwork/drivers/bridge: remove ErrInvalidMtu
It's a generic errdefs.ErrInvalidParameter, and the type itself is not used as sentinel error anywhere. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
@@ -235,7 +235,7 @@ func ValidateFixedCIDRV6(val string) error {
|
||||
// Whatever can be assessed a priori before attempting any programming.
|
||||
func (c *networkConfiguration) Validate() error {
|
||||
if c.Mtu < 0 {
|
||||
return ErrInvalidMtu(c.Mtu)
|
||||
return errdefs.InvalidParameter(fmt.Errorf("invalid MTU number: %d", c.Mtu))
|
||||
}
|
||||
|
||||
if c.EnableIPv4 {
|
||||
|
||||
@@ -16,16 +16,6 @@ func (eig *ErrInvalidGateway) Error() string {
|
||||
// InvalidParameter denotes the type of this error
|
||||
func (eig *ErrInvalidGateway) InvalidParameter() {}
|
||||
|
||||
// ErrInvalidMtu is returned when the user provided MTU is not valid.
|
||||
type ErrInvalidMtu int
|
||||
|
||||
func (eim ErrInvalidMtu) Error() string {
|
||||
return fmt.Sprintf("invalid MTU number: %d", int(eim))
|
||||
}
|
||||
|
||||
// InvalidParameter denotes the type of this error
|
||||
func (eim ErrInvalidMtu) InvalidParameter() {}
|
||||
|
||||
// InvalidNetworkIDError is returned when the passed
|
||||
// network id for an existing network is not a known id.
|
||||
type InvalidNetworkIDError string
|
||||
|
||||
Reference in New Issue
Block a user