remove duplicate ErrNotFound in client

This commit is contained in:
Pavel Sviderski committed 2024-12-03 15:47:33 +10:00
1 parent 5da1fc5387
commit 417427b4d5
2 files changed
+2 -6

No files matched your search

+1 -5
View File
@@ -17,10 +17,6 @@ import (
const defaultClusterName = "default"
var (
ErrNotFound = errors.New("not found")
)
type CLI struct {
config *config.Config
}
@@ -47,7 +43,7 @@ func (cli *CLI) CreateCluster(name string) error {
func (cli *CLI) SetCurrentCluster(name string) error {
if _, ok := cli.config.Clusters[name]; !ok {
return ErrNotFound
return client.ErrNotFound
}
cli.config.CurrentCluster = name
return cli.config.Save()