Skip to content

Commit

Permalink
Fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
garnold54 committed Apr 8, 2024
1 parent d3d110c commit 3cdd506
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions cmd/deploymentparameters_create.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
Expand Down Expand Up @@ -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")
}
Expand All @@ -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

Expand Down
4 changes: 2 additions & 2 deletions cmd/deploymentparameters_update.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
Expand Down Expand Up @@ -119,7 +119,7 @@ func deploymentParametersUpdateRun(f *deploymentParameterUpdateFlags) func(cmd *
}
}

var newDepParam UpdateDeplymentParameter
var newDepParam UpdateDeploymentParameter
newDepParam.ChoiceSettings = new(ChoiceSettings)
newDepParam.Value = f.value

Expand Down
8 changes: 4 additions & 4 deletions cmd/deploymentparameters_update_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand Down

0 comments on commit 3cdd506

Please sign in to comment.