Skip to content

Commit 5e42f82

Browse files
Merge pull request #6518 from thaJeztah/28.x_backport_memstore_notfounderr
[28.x backport] cli/config/memorystore: remove unused IsErrValueNotFound
2 parents 645c23b + a3ffb8a commit 5e42f82

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

cli/config/memorystore/store.go

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
package memorystore
44

55
import (
6-
"errors"
76
"fmt"
87
"maps"
98
"os"
@@ -13,12 +12,17 @@ import (
1312
"github.com/docker/cli/cli/config/types"
1413
)
1514

16-
var errValueNotFound = errors.New("value not found")
15+
// notFoundErr is the error returned when a plugin could not be found.
16+
type notFoundErr string
1717

18-
func IsErrValueNotFound(err error) bool {
19-
return errors.Is(err, errValueNotFound)
18+
func (notFoundErr) NotFound() {}
19+
20+
func (e notFoundErr) Error() string {
21+
return string(e)
2022
}
2123

24+
var errValueNotFound notFoundErr = "value not found"
25+
2226
type Config struct {
2327
lock sync.RWMutex
2428
memoryCredentials map[string]types.AuthConfig

0 commit comments

Comments
 (0)