diff --git a/cli/analytics.go b/cli/analytics.go index 281a4976a..2a85face2 100644 --- a/cli/analytics.go +++ b/cli/analytics.go @@ -14,7 +14,7 @@ func redactStepInputs(environment map[string]string, inputs []models.Environment redactedStepInputs := make(map[string]string) redactedOriginalInputs := map[string]string{} - // Filter inputs from enviroments + // Filter inputs from environments for _, input := range inputs { inputKey, originalValue, err := input.GetKeyValuePair() if err != nil { diff --git a/cli/commands.go b/cli/commands.go index 00a46a9ae..cd3c3d285 100644 --- a/cli/commands.go +++ b/cli/commands.go @@ -17,7 +17,7 @@ const ( ConfigKey = "config" InventoryKey = "inventory" - OuputFormatKey = "format" + OutputFormatKey = "format" ) var ( @@ -63,7 +63,7 @@ var ( cli.StringFlag{Name: PRReadyStateKey, Usage: "Git pull request ready state. Options: ready_for_review draft converted_to_ready_for_review"}, cli.StringFlag{Name: TagKey, Usage: "Git tag name."}, - cli.StringFlag{Name: OuputFormatKey, Usage: "Output format. Accepted: json, yml."}, + cli.StringFlag{Name: OutputFormatKey, Usage: "Output format. Accepted: json, yml."}, // cli params used in CI mode cli.StringFlag{Name: JSONParamsKey, Usage: "Specify command flags with json string-string hash."}, diff --git a/cli/flags.go b/cli/flags.go index 124dd69ad..088138a2c 100644 --- a/cli/flags.go +++ b/cli/flags.go @@ -31,8 +31,8 @@ const ( MinimalModeKey = "minimal" FullModeKey = "full" - ouputFormatKeyShort = "f" - OuputPathKey = "outpath" + outputFormatKeyShort = "f" + OutputPathKey = "outpath" PrettyFormatKey = "pretty" IDKey = "id" @@ -72,7 +72,7 @@ var ( } // Command flags flOutputFormat = cli.StringFlag{ - Name: OuputFormatKey + ", " + ouputFormatKeyShort, + Name: OutputFormatKey + ", " + outputFormatKeyShort, Usage: "Output format. Accepted: raw (default), json, yml", } flCollection = cli.StringFlag{ @@ -99,11 +99,11 @@ var ( // Export flFormat = cli.StringFlag{ - Name: OuputFormatKey, + Name: OutputFormatKey, Usage: "Output format. Accepted: json, yml.", } flOutputPath = cli.StringFlag{ - Name: OuputPathKey, + Name: OutputPathKey, Usage: "Output path, where the exported file will be saved.", } flPretty = cli.BoolFlag{ diff --git a/cli/run.go b/cli/run.go index 31efa3bf6..4cdf028df 100644 --- a/cli/run.go +++ b/cli/run.go @@ -430,7 +430,7 @@ func processArgs(c *cli.Context) (*RunConfig, error) { return nil, fmt.Errorf("failed to check Secret Envs Filtering mode: %s", err) } - noOutputTimeout := readNoOutputTimoutConfiguration(inventoryEnvironments) + noOutputTimeout := readNoOutputTimeoutConfiguration(inventoryEnvironments) return &RunConfig{ Modes: models.WorkflowRunModes{ diff --git a/cli/run_config.go b/cli/run_config.go index 461f56daa..bf0f8078e 100644 --- a/cli/run_config.go +++ b/cli/run_config.go @@ -10,7 +10,7 @@ import ( envmanModels "github.com/bitrise-io/envman/models" ) -func getNoOutputTimoutValue(inventoryEnvironments []envmanModels.EnvironmentItemModel) (string, error) { +func getNoOutputTimeoutValue(inventoryEnvironments []envmanModels.EnvironmentItemModel) (string, error) { for _, env := range inventoryEnvironments { key, value, err := env.GetKeyValuePair() if err != nil { @@ -25,9 +25,9 @@ func getNoOutputTimoutValue(inventoryEnvironments []envmanModels.EnvironmentItem return os.Getenv(configs.NoOutputTimeoutEnvKey), nil } -func readNoOutputTimoutConfiguration(inventoryEnvironments []envmanModels.EnvironmentItemModel) time.Duration { +func readNoOutputTimeoutConfiguration(inventoryEnvironments []envmanModels.EnvironmentItemModel) time.Duration { const defaultTimeout = -1 - envVal, err := getNoOutputTimoutValue(inventoryEnvironments) + envVal, err := getNoOutputTimeoutValue(inventoryEnvironments) if err != nil { log.Errorf("Failed to read value of %s: %s", configs.NoOutputTimeoutEnvKey, err) return defaultTimeout diff --git a/cli/run_trigger_params_test.go b/cli/run_trigger_params_test.go index 91e3fd8e6..efe64b9d0 100644 --- a/cli/run_trigger_params_test.go +++ b/cli/run_trigger_params_test.go @@ -33,7 +33,7 @@ func TestParseRunAndTriggerJSONParams(t *testing.T) { PRReadyStateKey: models.PullRequestReadyStateReadyForReview, TagKey: "0.9.0", - OuputFormatKey: "json", + OutputFormatKey: "json", ConfigKey: "bitrise.yml", ConfigBase64Key: toBase64("bitrise.yml"), @@ -163,7 +163,7 @@ func TestParseRunAndTriggerParams(t *testing.T) { PRTargetBranchKey: prTargetBranch, PRReadyStateKey: prReadyState, TagKey: tag, - OuputFormatKey: format, + OutputFormatKey: format, ConfigKey: bitriseConfigPath, ConfigBase64Key: bitriseConfigBase64Data, @@ -223,7 +223,7 @@ func TestParseRunAndTriggerParams(t *testing.T) { PRTargetBranchKey: prTargetBranch, PRReadyStateKey: prReadyState, TagKey: tag, - OuputFormatKey: format, + OutputFormatKey: format, ConfigKey: bitriseConfigPath, ConfigBase64Key: bitriseConfigBase64Data, @@ -283,7 +283,7 @@ func TestParseRunAndTriggerParams(t *testing.T) { PRTargetBranchKey: prTargetBranch, PRReadyStateKey: prReadyState, TagKey: tag, - OuputFormatKey: format, + OutputFormatKey: format, ConfigKey: bitriseConfigPath, ConfigBase64Key: bitriseConfigBase64Data, diff --git a/cli/trigger_check.go b/cli/trigger_check.go index b456260d2..8bb5ccc17 100644 --- a/cli/trigger_check.go +++ b/cli/trigger_check.go @@ -102,7 +102,7 @@ func triggerCheck(c *cli.Context) error { jsonParams := c.String(JSONParamsKey) jsonParamsBase64 := c.String(JSONParamsBase64Key) - format := c.String(OuputFormatKey) + format := c.String(OutputFormatKey) triggerParams, err := parseTriggerCheckParams( triggerPattern, diff --git a/cli/validate.go b/cli/validate.go index 7c1624085..695e019ce 100644 --- a/cli/validate.go +++ b/cli/validate.go @@ -225,7 +225,7 @@ func validate(c *cli.Context) error { inventoryBase64Data := c.String(InventoryBase64Key) inventoryPath := c.String(InventoryKey) - format := c.String(OuputFormatKey) + format := c.String(OutputFormatKey) if format == "" { format = output.FormatRaw }