Sfoglia il codice sorgente

libnetwork: remove unused ErrInvalidJoin

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Sebastiaan van Stijn 1 anno fa
parent
commit
99ab11bb90
2 ha cambiato i file con 1 aggiunte e 12 eliminazioni
  1. 0 11
      libnetwork/error.go
  2. 1 1
      libnetwork/errors_test.go

+ 0 - 11
libnetwork/error.go

@@ -25,17 +25,6 @@ func (nse ErrNoSuchEndpoint) Error() string {
 // NotFound denotes the type of this error
 func (nse ErrNoSuchEndpoint) NotFound() {}
 
-// ErrInvalidJoin is returned if a join is attempted on an endpoint
-// which already has a container joined.
-type ErrInvalidJoin struct{}
-
-func (ij ErrInvalidJoin) Error() string {
-	return "a container has already joined the endpoint"
-}
-
-// BadRequest denotes the type of this error
-func (ij ErrInvalidJoin) BadRequest() {}
-
 // ErrNoContainer is returned when the endpoint has no container
 // attached to it.
 type ErrNoContainer struct{}

+ 1 - 1
libnetwork/errors_test.go

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