From 3cdd506fa55bf062f86e9e4a6865d0821c8e42b0 Mon Sep 17 00:00:00 2001 From: Grant Arnold Date: Mon, 8 Apr 2024 14:17:00 -0700 Subject: [PATCH] Fix typos --- cmd/deploymentparameters_create.go | 6 +++--- cmd/deploymentparameters_update.go | 4 ++-- cmd/deploymentparameters_update_test.go | 8 ++++---- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/cmd/deploymentparameters_create.go b/cmd/deploymentparameters_create.go index a57db86..5382b28 100644 --- a/cmd/deploymentparameters_create.go +++ b/cmd/deploymentparameters_create.go @@ -11,7 +11,7 @@ import ( "github.com/spf13/cobra" ) -type NewDeplymentParameter struct { +type NewDeploymentParameter struct { Name string `json:"name"` Type string `json:"type"` Value string `json:"value"` @@ -66,7 +66,7 @@ func deploymentParametersCreateRun(f *deploymentParameterCreateFlags) func(cmd * f.dpType = deploymentParameterTypeFlagText } - // if type isnot web and includeServices or excludedServices is set, then error + // if type is not web and includeServices or excludedServices is set, then error if f.dpType != deploymentParameterTypeFlagWeb && (len(f.includedServices) > 0 || len(f.excludedServices) > 0) { return errors.New("cannot include or exclude services for a non-web connection deployment parameter") } @@ -79,7 +79,7 @@ func deploymentParametersCreateRun(f *deploymentParameterCreateFlags) func(cmd * // set up http client := &http.Client{} - var newDepParam NewDeplymentParameter + var newDepParam NewDeploymentParameter newDepParam.Name = f.name newDepParam.Value = f.value diff --git a/cmd/deploymentparameters_update.go b/cmd/deploymentparameters_update.go index dbb78bb..2e8f6a2 100644 --- a/cmd/deploymentparameters_update.go +++ b/cmd/deploymentparameters_update.go @@ -11,7 +11,7 @@ import ( "github.com/spf13/cobra" ) -type UpdateDeplymentParameter struct { +type UpdateDeploymentParameter struct { Type string `json:"type,omitempty"` Value string `json:"value"` ChoiceSettings *ChoiceSettings `json:"choiceSettings,omitempty"` @@ -119,7 +119,7 @@ func deploymentParametersUpdateRun(f *deploymentParameterUpdateFlags) func(cmd * } } - var newDepParam UpdateDeplymentParameter + var newDepParam UpdateDeploymentParameter newDepParam.ChoiceSettings = new(ChoiceSettings) newDepParam.Value = f.value diff --git a/cmd/deploymentparameters_update_test.go b/cmd/deploymentparameters_update_test.go index e39918d..4fc45cc 100644 --- a/cmd/deploymentparameters_update_test.go +++ b/cmd/deploymentparameters_update_test.go @@ -68,7 +68,7 @@ func TestDeploymentParametersUpdate(t *testing.T) { // check the json body is correct body, err := io.ReadAll(r.Body) require.NoError(t, err) - var result UpdateDeplymentParameter + var result UpdateDeploymentParameter err = json.Unmarshal(body, &result) require.NoError(t, err) require.Equal(t, "text", result.Type) @@ -93,7 +93,7 @@ func TestDeploymentParametersUpdate(t *testing.T) { // check the json body is correct body, err := io.ReadAll(r.Body) require.NoError(t, err) - var result UpdateDeplymentParameter + var result UpdateDeploymentParameter err = json.Unmarshal(body, &result) require.NoError(t, err) require.Equal(t, "dropdown", result.Type) @@ -119,7 +119,7 @@ func TestDeploymentParametersUpdate(t *testing.T) { // check the json body is correct body, err := io.ReadAll(r.Body) require.NoError(t, err) - var result UpdateDeplymentParameter + var result UpdateDeploymentParameter err = json.Unmarshal(body, &result) require.NoError(t, err) require.Equal(t, "dropdown", result.Type) @@ -146,7 +146,7 @@ func TestDeploymentParametersUpdate(t *testing.T) { // check the json body is correct body, err := io.ReadAll(r.Body) require.NoError(t, err) - var result UpdateDeplymentParameter + var result UpdateDeploymentParameter err = json.Unmarshal(body, &result) require.NoError(t, err) require.Equal(t, "dropdown", result.Type)