Browse Source

libnetwork: remove unused InvalidContainerIDError

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Sebastiaan van Stijn 1 year ago
parent
commit
66b379785e
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

@@ -99,17 +99,6 @@ func (ace *ActiveContainerError) Error() string {
 // Forbidden denotes the type of this error
 func (ace *ActiveContainerError) Forbidden() {}
 
-// InvalidContainerIDError is returned when an invalid container id is passed
-// in Join/Leave
-type InvalidContainerIDError string
-
-func (id InvalidContainerIDError) Error() string {
-	return fmt.Sprintf("invalid container id %s", string(id))
-}
-
-// BadRequest denotes the type of this error
-func (id InvalidContainerIDError) BadRequest() {}
-
 // ManagerRedirectError is returned when the request should be redirected to Manager
 type ManagerRedirectError string
 

+ 1 - 1
libnetwork/errors_test.go

@@ -7,7 +7,7 @@ import (
 )
 
 func TestErrorInterfaces(t *testing.T) {
-	badRequestErrorList := []error{ErrInvalidID(""), ErrInvalidName(""), InvalidContainerIDError("")}
+	badRequestErrorList := []error{ErrInvalidID(""), ErrInvalidName("")}
 	for _, err := range badRequestErrorList {
 		switch u := err.(type) {
 		case types.BadRequestError: