Browse Source

libnetwork: remove unused NetworkTypeError

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Sebastiaan van Stijn 1 year ago
parent
commit
fc5c16f491
2 changed files with 1 additions and 12 deletions
  1. 0 11
      libnetwork/error.go
  2. 1 1
      libnetwork/errors_test.go

+ 0 - 11
libnetwork/error.go

@@ -47,17 +47,6 @@ func (in ErrInvalidName) Error() string {
 // BadRequest denotes the type of this error
 func (in ErrInvalidName) BadRequest() {}
 
-// NetworkTypeError type is returned when the network type string is not
-// known to libnetwork.
-type NetworkTypeError string
-
-func (nt NetworkTypeError) Error() string {
-	return fmt.Sprintf("unknown driver %q", string(nt))
-}
-
-// NotFound denotes the type of this error
-func (nt NetworkTypeError) NotFound() {}
-
 // NetworkNameError is returned when a network with the same name already exists.
 type NetworkNameError string
 

+ 1 - 1
libnetwork/errors_test.go

@@ -25,7 +25,7 @@ func TestErrorInterfaces(t *testing.T) {
 		}
 	}
 
-	notFoundErrorList := []error{NetworkTypeError(""), &UnknownNetworkError{}, &UnknownEndpointError{}, ErrNoSuchNetwork(""), ErrNoSuchEndpoint("")}
+	notFoundErrorList := []error{&UnknownNetworkError{}, &UnknownEndpointError{}, ErrNoSuchNetwork(""), ErrNoSuchEndpoint("")}
 	for _, err := range notFoundErrorList {
 		switch u := err.(type) {
 		case types.NotFoundError: