libnetwork: remove unused InvalidContainerIDError

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2023-07-29 01:58:16 +02:00
parent d8cd4f6421
commit 66b379785e
No known key found for this signature in database
GPG key ID: 76698F39D527CE8C
2 changed files with 1 additions and 12 deletions

View file

@ -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

View file

@ -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: