From fd3736bd994a03393d8a0ece8932c32b3dbcba79 Mon Sep 17 00:00:00 2001 From: alwayshang <166124491+alwayshang@users.noreply.github.com> Date: Sun, 7 Apr 2024 19:48:13 +0800 Subject: [PATCH] chore: fix repetitive words (#1472) Signed-off-by: alwayshang --- cmd/tofu/main.go | 2 +- internal/backend/local/backend_plan_test.go | 2 +- internal/checks/state.go | 2 +- internal/command/e2etest/automation_test.go | 2 +- internal/command/jsonplan/plan.go | 2 +- internal/command/meta_backend_migrate.go | 2 +- internal/registry/test/mock_registry.go | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/cmd/tofu/main.go b/cmd/tofu/main.go index cdad38da22..a95f71f920 100644 --- a/cmd/tofu/main.go +++ b/cmd/tofu/main.go @@ -503,7 +503,7 @@ func extractChdirOption(args []string) (string, []string, error) { return argValue, newArgs, nil } -// Creates the the configuration directory. +// Creates the configuration directory. // `configDir` should refer to `~/.terraform.d`, `$XDG_CONFIG_HOME/opentofu` or its equivalent // on non-UNIX platforms. func mkConfigDir(configDir string) error { diff --git a/internal/backend/local/backend_plan_test.go b/internal/backend/local/backend_plan_test.go index d2d908cc6f..67158d4841 100644 --- a/internal/backend/local/backend_plan_test.go +++ b/internal/backend/local/backend_plan_test.go @@ -637,7 +637,7 @@ func TestLocal_planDestroy_withDataSources(t *testing.T) { t.Fatal("plan should not be empty") } - // Data source should still exist in the the plan file + // Data source should still exist in the plan file plan := testReadPlan(t, planPath) if len(plan.Changes.Resources) != 2 { t.Fatalf("Expected exactly 1 resource for destruction, %d given: %q", diff --git a/internal/checks/state.go b/internal/checks/state.go index a214470fcc..cfa157dcb4 100644 --- a/internal/checks/state.go +++ b/internal/checks/state.go @@ -14,7 +14,7 @@ import ( "github.com/opentofu/opentofu/internal/configs" ) -// State is a container for state tracking of all of the the checks declared in +// State is a container for state tracking of all of the checks declared in // a particular OpenTofu configuration and their current statuses. // // A State object is mutable during plan and apply operations but should diff --git a/internal/command/e2etest/automation_test.go b/internal/command/e2etest/automation_test.go index ed1f63feff..4b403f06a3 100644 --- a/internal/command/e2etest/automation_test.go +++ b/internal/command/e2etest/automation_test.go @@ -234,7 +234,7 @@ func TestPlanOnlyInAutomation(t *testing.T) { } // Because we're running with TF_IN_AUTOMATION set, we should not see - // any mention of the the "tofu apply" command in the output. + // any mention of the "tofu apply" command in the output. if strings.Contains(stdout, "tofu apply") { t.Errorf("unwanted mention of \"tofu apply\" in plan output\n%s", stdout) } diff --git a/internal/command/jsonplan/plan.go b/internal/command/jsonplan/plan.go index ad8fb022d4..e82950d54c 100644 --- a/internal/command/jsonplan/plan.go +++ b/internal/command/jsonplan/plan.go @@ -893,7 +893,7 @@ func UnmarshalActions(actions []string) plans.Action { // indexes. // // JavaScript (or similar dynamic language) consumers of these values can -// iterate over the the steps starting from the root object to reach the +// iterate over the steps starting from the root object to reach the // value that each path is describing. func encodePaths(pathSet cty.PathSet) (json.RawMessage, error) { if pathSet.Empty() { diff --git a/internal/command/meta_backend_migrate.go b/internal/command/meta_backend_migrate.go index ca0418b560..23b2e99c95 100644 --- a/internal/command/meta_backend_migrate.go +++ b/internal/command/meta_backend_migrate.go @@ -709,7 +709,7 @@ func (m *Meta) backendMigrateState_S_TFC(opts *backendMigrateOpts, sourceWorkspa // * Specifically for a migration from the "remote" backend using 'prefix', we will // instead 'migrate' the workspaces using a pattern based on the old prefix+name, // not allowing a user to accidentally input the wrong pattern to line up with - // what the the remote backend was already using before (which presumably already + // what the remote backend was already using before (which presumably already // meets the naming considerations for Terraform Cloud). // In other words, this is a fast-track migration path from the remote backend, retaining // how things already are in Terraform Cloud with no user intervention needed. diff --git a/internal/registry/test/mock_registry.go b/internal/registry/test/mock_registry.go index aca8c59215..6a1827b521 100644 --- a/internal/registry/test/mock_registry.go +++ b/internal/registry/test/mock_registry.go @@ -64,7 +64,7 @@ var ( ) // All the locationes from the mockRegistry start with a file:// scheme. If -// the the location string here doesn't have a scheme, the mockRegistry will +// the location string here doesn't have a scheme, the mockRegistry will // find the absolute path and return a complete URL. var testMods = map[string][]testMod{ "registry/foo/bar": {{