diff --git a/internal/cli/cli.go b/internal/cli/cli.go index 8d884d48..25b6c62d 100644 --- a/internal/cli/cli.go +++ b/internal/cli/cli.go @@ -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() diff --git a/internal/cli/client/client.go b/internal/cli/client/client.go index 156d7064..c4544301 100644 --- a/internal/cli/client/client.go +++ b/internal/cli/client/client.go @@ -9,7 +9,7 @@ import ( "uncloud/internal/machine/docker" ) -var NotFound = errors.New("not found") +var ErrNotFound = errors.New("not found") // Client is a client for the machine API. type Client struct {