From 5109db5ff3d48a7af43f83edcd0933bb74767ca3 Mon Sep 17 00:00:00 2001 From: Craig Andrews Date: Wed, 3 May 2023 16:06:26 -0400 Subject: [PATCH] chore: Fix spelling errors Correct spelling is a great way to look more professional and demonstrate higher quality. And it catches a surprisingly number of actual errors, too. Signed-off-by: Craig Andrews --- .codespellrc | 5 +++++ ATTRIBUTIONS.md | 2 +- cmd/controller-bootstrap/command/common.go | 4 ++-- pkg/util/git.go | 2 +- 4 files changed, 9 insertions(+), 4 deletions(-) create mode 100644 .codespellrc diff --git a/.codespellrc b/.codespellrc new file mode 100644 index 0000000..d8ad59c --- /dev/null +++ b/.codespellrc @@ -0,0 +1,5 @@ +[codespell] +skip = .codespellrc,./.git +check-filenames = +check-hidden = +quiet = 2 diff --git a/ATTRIBUTIONS.md b/ATTRIBUTIONS.md index db4d9a7..0792b01 100644 --- a/ATTRIBUTIONS.md +++ b/ATTRIBUTIONS.md @@ -94,7 +94,7 @@ syntax/tree.go (from RegexTree.cs and RegexNode.cs): ported literally as possibl syntax/writer.go (from RegexWriter.cs): ported literally with minor changes to make it more Go-ish. -match.go (from RegexMatch.cs): ported, simplified, and changed to handle Go's lack of inheritence. +match.go (from RegexMatch.cs): ported, simplified, and changed to handle Go's lack of inheritance. regexp.go (from Regex.cs and RegexOptions.cs): conceptually serves the same "starting point", but is simplified and changed to handle differences in C# strings and Go strings/runes. diff --git a/cmd/controller-bootstrap/command/common.go b/cmd/controller-bootstrap/command/common.go index 47d1600..74e38d0 100644 --- a/cmd/controller-bootstrap/command/common.go +++ b/cmd/controller-bootstrap/command/common.go @@ -114,7 +114,7 @@ func ensureSDKRepo( return err } - // Clone repository if it doen't exist + // Clone repository if it doesn't exist sdkDir = filepath.Join(srcPath, "aws-sdk-go") if _, err := os.Stat(sdkDir); os.IsNotExist(err) { @@ -122,7 +122,7 @@ func ensureSDKRepo( defer cancel() err = util.CloneRepository(ctx, sdkDir, sdkRepoURL) if err != nil { - return fmt.Errorf("canot clone repository: %v", err) + return fmt.Errorf("cannot clone repository: %v", err) } } diff --git a/pkg/util/git.go b/pkg/util/git.go index b856a87..4e6ff51 100644 --- a/pkg/util/git.go +++ b/pkg/util/git.go @@ -27,7 +27,7 @@ import ( // LoadRepository loads a repository from the local file system. // TODO: load repository into a memory filesystem - needs go1.16 -// migration or use somethign like https://github.com/spf13/afero +// migration or use something like https://github.com/spf13/afero func LoadRepository(path string) (*git.Repository, error) { return git.PlainOpen(path) }