From 3edfff49a25fe28739f88a3fe0424cee28f8339d Mon Sep 17 00:00:00 2001 From: cui fliter Date: Tue, 25 Apr 2023 15:04:09 +0800 Subject: [PATCH] fix some comments Signed-off-by: cui fliter --- cmd/flux/bootstrap_git.go | 2 +- internal/build/build.go | 2 +- pkg/manifestgen/manifest.go | 2 +- rfcs/0005-artifact-revision-and-digest/README.md | 4 ++-- rfcs/RFC-0000/README.md | 2 +- tests/azure/util_test.go | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/cmd/flux/bootstrap_git.go b/cmd/flux/bootstrap_git.go index 4a6234ca..bd9dc80a 100644 --- a/cmd/flux/bootstrap_git.go +++ b/cmd/flux/bootstrap_git.go @@ -134,7 +134,7 @@ func bootstrapGitCmdRun(cmd *cobra.Command, args []string) error { } } if repositoryURL.Scheme == string(git.HTTPS) && !bootstrapArgs.tokenAuth { - return fmt.Errorf("--token-auth=true must be specified for using a HTTPS AWS CodeCommit url") + return fmt.Errorf("--token-auth=true must be specified for using an HTTPS AWS CodeCommit url") } } diff --git a/internal/build/build.go b/internal/build/build.go index 5f6e21e5..98f0f683 100644 --- a/internal/build/build.go +++ b/internal/build/build.go @@ -419,7 +419,7 @@ func maskSopsData(res *resource.Resource) error { res.PipeE(yaml.FieldClearer{Name: "sops"}) secretType, err := res.GetFieldValue(typeField) - // If the intented type is Opaque, then it can be omitted from the manifest, since it's the default + // If the intended type is Opaque, then it can be omitted from the manifest, since it's the default // Ref: https://kubernetes.io/docs/concepts/configuration/secret/#opaque-secrets if errors.As(err, &yaml.NoFieldError{}) { secretType = "Opaque" diff --git a/pkg/manifestgen/manifest.go b/pkg/manifestgen/manifest.go index db385f69..86df69d0 100644 --- a/pkg/manifestgen/manifest.go +++ b/pkg/manifestgen/manifest.go @@ -34,7 +34,7 @@ type Manifest struct { Content string } -// WriteFile writes the YAML content to a file inside the the root path. +// WriteFile writes the YAML content to a file inside the root path. // If the file does not exist, WriteFile creates it with permissions perm, // otherwise WriteFile overwrites the file, without changing permissions. func (m *Manifest) WriteFile(rootDir string) (string, error) { diff --git a/rfcs/0005-artifact-revision-and-digest/README.md b/rfcs/0005-artifact-revision-and-digest/README.md index e8107281..32b4c466 100644 --- a/rfcs/0005-artifact-revision-and-digest/README.md +++ b/rfcs/0005-artifact-revision-and-digest/README.md @@ -284,7 +284,7 @@ algorithm. #### Backwards compatibility -To allow backwards compatability in the notification-controller, Flux CLI and +To allow backwards compatibility in the notification-controller, Flux CLI and other applicable components, the `Revision` new field value format could be detected by the presence of the `@` or `:` characters. Falling back to their current behaviour if not present, phasing out the old format in a future @@ -344,7 +344,7 @@ future release. The `Digest` field MUST be used instead. #### Backwards compatibility -To allow backwards compatability, the source-controller could continue +To allow backwards compatibility, the source-controller could continue to advertise the checksum part of a `Digest` in the `Checksum` field until the field is removed. diff --git a/rfcs/RFC-0000/README.md b/rfcs/RFC-0000/README.md index b935b064..309c7dd0 100644 --- a/rfcs/RFC-0000/README.md +++ b/rfcs/RFC-0000/README.md @@ -51,7 +51,7 @@ you're proposing, but should not include things like API designs or implementation. If the RFC goal is to document best practices, -then this section can be replaced with the the actual documentation. +then this section can be replaced with the actual documentation. --> ### User Stories diff --git a/tests/azure/util_test.go b/tests/azure/util_test.go index 3ad9a9b7..4af53f39 100644 --- a/tests/azure/util_test.go +++ b/tests/azure/util_test.go @@ -182,7 +182,7 @@ patchesStrategicMerge: files["clusters/e2e/flux-system/gotk-sync.yaml"] = strings.NewReader("") err = commitAndPushAll(repo, files, defaultBranch) if err != nil { - return fmt.Errorf("error commiting and pushing manifests: %w", err) + return fmt.Errorf("error committing and pushing manifests: %w", err) } bootstrapCmd := fmt.Sprintf("flux bootstrap git --url=%s --password=%s --kubeconfig=%s"+