libnetwork: remove UnknownNetworkError

It was only returned in 2 places, and not used any different than
a "notfound" error, so let's use a standard errdefs.NotFound

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn
2025-01-22 23:15:30 +01:00
parent 8f4c98e1eb
commit 5c1fe287fc
3 changed files with 4 additions and 17 deletions

View File

@@ -56,20 +56,6 @@ func (nnr NetworkNameError) Error() string {
// Conflict denotes the type of this error
func (nnr NetworkNameError) Conflict() {}
// UnknownNetworkError is returned when libnetwork could not find in its database
// a network with the same name and id.
type UnknownNetworkError struct {
name string
id string
}
func (une *UnknownNetworkError) Error() string {
return fmt.Sprintf("unknown network %s id %s", une.name, une.id)
}
// NotFound denotes the type of this error
func (une *UnknownNetworkError) NotFound() {}
// ActiveEndpointsError is returned when a network is deleted which has active
// endpoints in it.
type ActiveEndpointsError struct {