From 77bd64cda648722426a8a4bdb49e521e75a3cff0 Mon Sep 17 00:00:00 2001 From: Amine Kherbouche Date: Wed, 23 Dec 2020 17:11:27 +0100 Subject: [PATCH] chore: fix typo (#1623) Signed-off-by: Amine Kherbouche --- internal/namespaces/instance/v1/custom_server_create.go | 2 +- internal/namespaces/instance/v1/custom_user_data.go | 2 +- .../testdata/test-user-data-get-get-an-nonexistent-key.golden | 4 ++-- internal/namespaces/k8s/v1/custom_kubeconfig_uninstall.go | 2 +- internal/namespaces/registry/v1/custom_docker_helper.go | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/internal/namespaces/instance/v1/custom_server_create.go b/internal/namespaces/instance/v1/custom_server_create.go index e2a82940ab..e6f59f1f85 100644 --- a/internal/namespaces/instance/v1/custom_server_create.go +++ b/internal/namespaces/instance/v1/custom_server_create.go @@ -326,7 +326,7 @@ func instanceServerCreateRun(ctx context.Context, argsI interface{}) (i interfac BootscriptID: args.BootscriptID, }) if err != nil { // FIXME: isNotFoundError - return nil, fmt.Errorf("bootscript ID %s does not exists", args.BootscriptID) + return nil, fmt.Errorf("bootscript ID %s does not exist", args.BootscriptID) } serverReq.Bootscript = scw.StringPtr(args.BootscriptID) diff --git a/internal/namespaces/instance/v1/custom_user_data.go b/internal/namespaces/instance/v1/custom_user_data.go index eb365ba452..1546a5f422 100644 --- a/internal/namespaces/instance/v1/custom_user_data.go +++ b/internal/namespaces/instance/v1/custom_user_data.go @@ -40,7 +40,7 @@ func userDataGetBuilder(c *core.Command) *core.Command { if err != nil { if resErr, ok := err.(*scw.ResponseError); ok { if resErr.StatusCode == http.StatusNotFound { - return nil, fmt.Errorf("'%s' key does not exists", req.Key) + return nil, fmt.Errorf("'%s' key does not exist", req.Key) } } return nil, err diff --git a/internal/namespaces/instance/v1/testdata/test-user-data-get-get-an-nonexistent-key.golden b/internal/namespaces/instance/v1/testdata/test-user-data-get-get-an-nonexistent-key.golden index c28a03cfbb..6495f27dad 100644 --- a/internal/namespaces/instance/v1/testdata/test-user-data-get-get-an-nonexistent-key.golden +++ b/internal/namespaces/instance/v1/testdata/test-user-data-get-get-an-nonexistent-key.golden @@ -1,7 +1,7 @@ 🎲🎲🎲 EXIT CODE: 1 🎲🎲🎲 πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ -'happy' key does not exists +'happy' key does not exist πŸŸ₯πŸŸ₯πŸŸ₯ JSON STDERR πŸŸ₯πŸŸ₯πŸŸ₯ { - "error": "'happy' key does not exists" + "error": "'happy' key does not exist" } diff --git a/internal/namespaces/k8s/v1/custom_kubeconfig_uninstall.go b/internal/namespaces/k8s/v1/custom_kubeconfig_uninstall.go index 3dd79cb048..cefcad2bdb 100644 --- a/internal/namespaces/k8s/v1/custom_kubeconfig_uninstall.go +++ b/internal/namespaces/k8s/v1/custom_kubeconfig_uninstall.go @@ -60,7 +60,7 @@ func k8sKubeconfigUninstallRun(ctx context.Context, argsI interface{}) (i interf // if the file does not exist, the cluster is not there if _, err := os.Stat(kubeconfigPath); os.IsNotExist(err) { - return fmt.Sprintf("File %s does not exists.", kubeconfigPath), nil + return fmt.Sprintf("File %s does not exist.", kubeconfigPath), nil } existingKubeconfig, err := openAndUnmarshalKubeconfig(kubeconfigPath) diff --git a/internal/namespaces/registry/v1/custom_docker_helper.go b/internal/namespaces/registry/v1/custom_docker_helper.go index 022b800dad..270eb4c42c 100644 --- a/internal/namespaces/registry/v1/custom_docker_helper.go +++ b/internal/namespaces/registry/v1/custom_docker_helper.go @@ -178,7 +178,7 @@ func registryDockerHelperGetRun(ctx context.Context, argsI interface{}) (i inter } if !serverFound { - return nil, fmt.Errorf("endpoint %s does not exists", serverURL) + return nil, fmt.Errorf("endpoint %s does not exist", serverURL) } client := core.ExtractClient(ctx)