Browse Source

libnetwork: remove unused UnknownEndpointError

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

+ 0 - 14
libnetwork/error.go

@@ -85,20 +85,6 @@ func (aee *ActiveEndpointsError) Error() string {
 // Forbidden denotes the type of this error
 func (aee *ActiveEndpointsError) Forbidden() {}
 
-// UnknownEndpointError is returned when libnetwork could not find in its database
-// an endpoint with the same name and id.
-type UnknownEndpointError struct {
-	name string
-	id   string
-}
-
-func (uee *UnknownEndpointError) Error() string {
-	return fmt.Sprintf("unknown endpoint %s id %s", uee.name, uee.id)
-}
-
-// NotFound denotes the type of this error
-func (uee *UnknownEndpointError) NotFound() {}
-
 // ActiveContainerError is returned when an endpoint is deleted which has active
 // containers attached to it.
 type ActiveContainerError struct {

+ 1 - 1
libnetwork/errors_test.go

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