diff --git a/changelog/v0.10.11/git-mv.yaml b/changelog/v0.10.11/git-mv.yaml index 02886a5f..fe560b5f 100644 --- a/changelog/v0.10.11/git-mv.yaml +++ b/changelog/v0.10.11/git-mv.yaml @@ -1,4 +1,4 @@ changelog: - type: NEW_FEATURE - description: Add utilites to help move and inspect files in a repo. + description: Add utilities to help move and inspect files in a repo. issueLink: https://github.com/solo-io/go-utils/issues/298 diff --git a/changelog/v0.10.27/logrus.yaml b/changelog/v0.10.27/logrus.yaml index 5597cd89..6b7fd7e1 100644 --- a/changelog/v0.10.27/logrus.yaml +++ b/changelog/v0.10.27/logrus.yaml @@ -1,4 +1,4 @@ changelog: - type: FIX - description: Change how logrus dependency is handled to aovid downstream problems. + description: Change how logrus dependency is handled to avoid downstream problems. issueLink: https://github.com/solo-io/go-utils/issues/340 \ No newline at end of file diff --git a/changelog/v0.22.3/configurable-changelog-dir.yaml b/changelog/v0.22.3/configurable-changelog-dir.yaml index 063fafb0..f63218da 100644 --- a/changelog/v0.22.3/configurable-changelog-dir.yaml +++ b/changelog/v0.22.3/configurable-changelog-dir.yaml @@ -1,3 +1,3 @@ changelog: - type: NON_USER_FACING - description: added ability to validate changelogs in a subdirectory by specifying `activeSubdirectory` in "validation.yaml". This should enable users to have less sprawling changelog directorys as time progresses. \ No newline at end of file + description: added ability to validate changelogs in a subdirectory by specifying `activeSubdirectory` in "validation.yaml". This should enable users to have less sprawling changelog directories as time progresses. \ No newline at end of file diff --git a/changelog/v0.28.7/fix-typos.yaml b/changelog/v0.28.7/fix-typos.yaml new file mode 100644 index 00000000..6629cee7 --- /dev/null +++ b/changelog/v0.28.7/fix-typos.yaml @@ -0,0 +1,4 @@ +changelog: + - type: FIX + issueLink: https://github.com/solo-io/go-utils/pull/539 + description: "Fixing typos in various places" diff --git a/changelog/v0.5.1/cluster-lock-timeout.yaml b/changelog/v0.5.1/cluster-lock-timeout.yaml index b74ad3e9..4229524f 100644 --- a/changelog/v0.5.1/cluster-lock-timeout.yaml +++ b/changelog/v0.5.1/cluster-lock-timeout.yaml @@ -1,4 +1,4 @@ changelog: - type: NEW_FEATURE - description: Add a tiemout to the cluster lock. + description: Add a timeout to the cluster lock. issueLink: https://github.com/solo-io/go-utils/issues/72 \ No newline at end of file diff --git a/changelog/v0.7.14/clicore.yaml b/changelog/v0.7.14/clicore.yaml index bd123a68..fe1e89d6 100644 --- a/changelog/v0.7.14/clicore.yaml +++ b/changelog/v0.7.14/clicore.yaml @@ -4,7 +4,7 @@ changelog: Introduce a utility for managing zap logs from a CLI tool. The new `clicore` library provides a means of sending human-friendly log messages to the console while capturing full json-formatted logs to a file. Library includes a pair of - `Run` methods for siplified execution of the "main" file and simplified output + `Run` methods for simplified execution of the "main" file and simplified output validation during integration tests. issueLink: https://github.com/solo-io/go-utils/issues/135 - type: NEW_FEATURE diff --git a/changeloggenutils/README.md b/changeloggenutils/README.md index fc5b013e..ff0687d7 100644 --- a/changeloggenutils/README.md +++ b/changeloggenutils/README.md @@ -14,7 +14,7 @@ As we often release bug fixes on backported branches, chronological ordering isn often requires a non-trivial amount of scrolling to get to the desired changelog. In addition, users often have a tough time finding out changes between different versions of our products. A changelog -"diff tool" would be exteremely useful here, but can not be done without additional processing on the +"diff tool" would be extremely useful here, but can not be done without additional processing on the markdown release notes from github. ## Changelog Gen Utils diff --git a/changeloggenutils/minor_release.go b/changeloggenutils/minor_release.go index 623b19ad..a66e7e62 100644 --- a/changeloggenutils/minor_release.go +++ b/changeloggenutils/minor_release.go @@ -123,7 +123,7 @@ type ReleaseData struct { } // Contains Changelog enterpriseNotes for Individual openSourceReleases -// ChangelogNotes is a map of individiual openSourceReleases to enterpriseNotes +// ChangelogNotes is a map of individual openSourceReleases to enterpriseNotes // e.g. v1.2.5-beta3 -> ChangelogNotes, v1.4.0 -> ChangelogNotes type VersionData struct { ChangelogNotes map[Version]*ChangelogNotes diff --git a/changelogutils/cmd/README.md b/changelogutils/cmd/README.md index 9e7d37c3..8bfd9a04 100644 --- a/changelogutils/cmd/README.md +++ b/changelogutils/cmd/README.md @@ -40,7 +40,7 @@ This release contained no user-facing changes. **New Features** -- Add utilites to help move and inspect files in a repo. (https://github.com/solo-io/go-utils/issues/298) +- Add utilities to help move and inspect files in a repo. (https://github.com/solo-io/go-utils/issues/298) **Fixes** @@ -508,7 +508,7 @@ This release contained no user-facing changes. **New Features** -- Introduce a utility for managing zap logs from a CLI tool. The new `clicore` library provides a means of sending human-friendly log messages to the console while capturing full json-formatted logs to a file. Library includes a pair of `Run` methods for siplified execution of the "main" file and simplified output validation during integration tests. (https://github.com/solo-io/go-utils/issues/135) +- Introduce a utility for managing zap logs from a CLI tool. The new `clicore` library provides a means of sending human-friendly log messages to the console while capturing full json-formatted logs to a file. Library includes a pair of `Run` methods for simplified execution of the "main" file and simplified output validation during integration tests. (https://github.com/solo-io/go-utils/issues/135) - Simplified way to call cobra commands from test environments. (https://github.com/solo-io/go-utils/issues/124) - The `PrintTrimmedStack` fail handler simplifies error tracking in ginkgo tests by printing a condensed stack trace upon failure. Printout excludes well-known overhead files so you can more easily sight the failing line. This eliminates the need to count stack offset via `ExpectWithOffset`. You can just use `Expect`. (https://github.com/solo-io/go-utils/issues/131) @@ -663,7 +663,7 @@ This release contained no user-facing changes. **New Features** -- Add a tiemout to the cluster lock. (https://github.com/solo-io/go-utils/issues/72) +- Add a timeout to the cluster lock. (https://github.com/solo-io/go-utils/issues/72) ### v0.5.0 diff --git a/changelogutils/reader.go b/changelogutils/reader.go index 97467529..fdb9631c 100644 --- a/changelogutils/reader.go +++ b/changelogutils/reader.go @@ -56,7 +56,7 @@ func (c *changelogReader) GetChangelogDirectory(ctx context.Context) string { var settings ValidationSettings bytes, err := c.code.GetFileContents(ctx, GetValidationSettingsPath()) if err != nil { - // unable to read validtion.yaml ~= "validation.yaml is not there" + // unable to read validation.yaml ~= "validation.yaml is not there" return "changelog" } diff --git a/changelogutils/validator.go b/changelogutils/validator.go index 1aeae901..15106f7d 100644 --- a/changelogutils/validator.go +++ b/changelogutils/validator.go @@ -112,7 +112,7 @@ type changelogValidator struct { reader ChangelogReader client githubutils.RepoClient code vfsutils.MountedRepo - // list of arbitrary labels whos order is used to tie-break tag comparisons between + // list of arbitrary labels whose order is used to tie-break tag comparisons between // versions with different labels. Labels ordered earlier are greater. labelOrder []string } diff --git a/cliutils/cli_helpers.go b/cliutils/cli_helpers.go index 096b35b0..75e0a61e 100644 --- a/cliutils/cli_helpers.go +++ b/cliutils/cli_helpers.go @@ -52,7 +52,7 @@ func Contains(a []string, s string) bool { return false } -// Contains indicates if a string slice 'a' contains a string that encompases the string s +// Contains indicates if a string slice 'a' contains a string that encompasses the string s func ContainsSubstring(a []string, substring string) bool { for _, n := range a { if strings.Contains(n, substring) { diff --git a/cliutils/port_forward.go b/cliutils/port_forward.go index e4aec55f..980e579e 100644 --- a/cliutils/port_forward.go +++ b/cliutils/port_forward.go @@ -109,7 +109,7 @@ func GetFreePort() (int, error) { defer l.Close() tcpAddr, ok := l.Addr().(*net.TCPAddr) if !ok { - return 0, errors.Errorf("Error occured looking for an open tcp port") + return 0, errors.Errorf("Error occurred looking for an open tcp port") } return tcpAddr.Port, nil } diff --git a/errgroup/errgroup.go b/errgroup/errgroup.go index 40036cd9..8a397495 100644 --- a/errgroup/errgroup.go +++ b/errgroup/errgroup.go @@ -1,5 +1,5 @@ // Package errgroup provides synchronization, error propagation, and Context -// cancelation for groups of goroutines working on subtasks of a common task. +// cancellation for groups of goroutines working on subtasks of a common task. // Based on golangorg/x/sync package errgroup diff --git a/gcloudutils/tags.go b/gcloudutils/tags.go index 0dd54241..e5b1be84 100644 --- a/gcloudutils/tags.go +++ b/gcloudutils/tags.go @@ -9,7 +9,7 @@ import ( type Tags []string const ( - seperator = "_" + separator = "_" tagConst = "tag" shaConst = "sha" refConst = "ref" @@ -27,11 +27,11 @@ func InitializeTags(input []string) Tags { } func createTag(title, item string) string { - return fmt.Sprintf("%s%s%s", title, seperator, item) + return fmt.Sprintf("%s%s%s", title, separator, item) } func createIntegerTag(title string, item int64) string { - return fmt.Sprintf("%s%s%d", title, seperator, item) + return fmt.Sprintf("%s%s%d", title, separator, item) } func (t Tags) AddReleaseTag(tag string) Tags { @@ -104,7 +104,7 @@ func (t Tags) GetInstallationId() int64 { func (t Tags) getByConst(item string) string { for _, v := range t { - splitVal := strings.SplitN(v, seperator, 2) + splitVal := strings.SplitN(v, separator, 2) if len(splitVal) == 2 && splitVal[0] == item { return splitVal[1] } diff --git a/grpcutils/dial_test.go b/grpcutils/dial_test.go index 0525c166..9f5067e5 100644 --- a/grpcutils/dial_test.go +++ b/grpcutils/dial_test.go @@ -122,7 +122,7 @@ func (s *serverImpl) GoListen(ctx context.Context, addr string) error { time.Sleep(time.Second / 2) continue } - // succcess + // success return nil } return errs diff --git a/healthchecker/grpc_test.go b/healthchecker/grpc_test.go index bccd9f6a..e7bc760a 100644 --- a/healthchecker/grpc_test.go +++ b/healthchecker/grpc_test.go @@ -81,7 +81,7 @@ var _ = Describe("grpc healthchecker", func() { }) Context("without service name", func() { - It("can recieve serving from a healthy server", func() { + It("can receive serving from a healthy server", func() { resp, err := client.Check(ctx, &healthpb.HealthCheckRequest{}) Expect(err).NotTo(HaveOccurred()) Expect(resp.Status).To(Equal(healthpb.HealthCheckResponse_SERVING)) @@ -98,7 +98,7 @@ var _ = Describe("grpc healthchecker", func() { Expect(resp.Status).To(Equal(s)) } - It("can recieve serving from a healthy server", func() { + It("can receive serving from a healthy server", func() { ExpectStatus(healthpb.HealthCheckResponse_SERVING) }) diff --git a/helmutils/helm_indent_finder.go b/helmutils/helm_indent_finder.go index ef3a058d..75d67f51 100644 --- a/helmutils/helm_indent_finder.go +++ b/helmutils/helm_indent_finder.go @@ -24,7 +24,7 @@ import ( // returns the windows of the helm chart that contain white spacing and formatting issues. func FindHelmChartWhiteSpaces(data string, opts HelmDetectOptions) [][]string { lines := strings.Split(string(data), "\n") - // we want to count each line, if the number of spaces at the begining is equal to 0, +2, or -2 from the previous line + // we want to count each line, if the number of spaces at the beginning is equal to 0, +2, or -2 from the previous line // then we want to continue to the next line. Else we want to throw an error. previous := previousInfo{NumOfSpaces: 0, BeganWithArray: false} badWindows := [][]string{} @@ -48,7 +48,7 @@ func FindHelmChartWhiteSpaces(data string, opts HelmDetectOptions) [][]string { shouldContinue := false currentNumOfSpaces := s.GetNumberOfSpacesAtBeginning() beginsWithArray := s.BeginsWithArray() - // next level is the next accpetable number of spaces + // next level is the next acceptable number of spaces nextLevel := previous.NumOfSpaces + 2 twoLevels := previous.NumOfSpaces + 4 isCurrentLevel := previous.NumOfSpaces == currentNumOfSpaces @@ -64,7 +64,7 @@ func FindHelmChartWhiteSpaces(data string, opts HelmDetectOptions) [][]string { // until we exit the specialBreak continue } - // // this means an empty line has occured, and it contains only spaces, so move on to the next line + // // this means an empty line has occurred, and it contains only spaces, so move on to the next line if (isCurrentLevel || isNextLevel) && containsOnlySpaces { continue } @@ -174,7 +174,7 @@ func (s *Spaces) IsEmptyLine() bool { return s.line == "" } -// HasSpecialBreak if the last section contians a special break +// HasSpecialBreak if the last section contains a special break func (s *Spaces) HasSpecialBreak() bool { specialBreaks := []string{"|", "|-", "|+", ">", ">+", ">-"} chars := s.spaces[len(s.spaces)-1] diff --git a/helmutils/helm_indent_finder_test.go b/helmutils/helm_indent_finder_test.go index 02c1b6a5..15063c13 100644 --- a/helmutils/helm_indent_finder_test.go +++ b/helmutils/helm_indent_finder_test.go @@ -172,7 +172,7 @@ metadata: }) It("should find that the array is off by 4 spaces", func() { // note the - "" is off by 4 spaces, this is acceptable - // this is whithin the array formatting specs. Same line, 2 spaces, or 4 spaces. + // this is within the array formatting specs. Same line, 2 spaces, or 4 spaces. data := ` resource: release: gloo-ee-test diff --git a/securityscanutils/commands/scan_version.go b/securityscanutils/commands/scan_version.go index c007a48b..4c290960 100644 --- a/securityscanutils/commands/scan_version.go +++ b/securityscanutils/commands/scan_version.go @@ -65,7 +65,7 @@ func (s scanVersionResult) String() string { return "No vulnerabilities found" } - return fmt.Sprintf("Vulernabilities found! Affected images: %v. Formatted results: %s", + return fmt.Sprintf("Vulnerabilities found! Affected images: %v. Formatted results: %s", s.ImagesWithVulnerabilities, s.OutputDir) } diff --git a/securityscanutils/trivy_scanner.go b/securityscanutils/trivy_scanner.go index fdf728ae..916bf72e 100644 --- a/securityscanutils/trivy_scanner.go +++ b/securityscanutils/trivy_scanner.go @@ -80,7 +80,7 @@ func (t *TrivyScanner) executeScanWithRetries(ctx context.Context, scanArgs []st // If we receive the expected status code, the scan completed, don't retry if statusCode == VulnerabilityFoundStatusCode { - logger.Debugf("Trivy found vulnerabilies after %s in %s", time.Since(attemptStart).String(), imageUri) + logger.Debugf("Trivy found vulnerabilities after %s in %s", time.Since(attemptStart).String(), imageUri) return true, true, nil } diff --git a/surveyutils/input_test.go b/surveyutils/input_test.go index c3447017..2db3c398 100644 --- a/surveyutils/input_test.go +++ b/surveyutils/input_test.go @@ -41,7 +41,7 @@ var _ = Describe("GetInput", func() { }) }) Context("multi select", func() { - It("can select one from a mutli-select list", func() { + It("can select one from a multi-select list", func() { clitestutils.ExpectInteractive(func(c *clitestutils.Console) { c.ExpectString("select option") c.PressDown() @@ -56,7 +56,7 @@ var _ = Describe("GetInput", func() { }) }) - It("can select mutli from a mutli-select list", func() { + It("can select multi from a multi-select list", func() { clitestutils.ExpectInteractive(func(c *clitestutils.Console) { c.ExpectString("select option") c.PressDown() diff --git a/tarutils/main.go b/tarutils/main.go index c955407a..8fa209f1 100644 --- a/tarutils/main.go +++ b/tarutils/main.go @@ -58,7 +58,7 @@ func Tar(src string, fs afero.Fs, writers ...io.Writer) error { return err } - // manually close here after each file operation; defering would cause each file close + // manually close here after each file operation; deferring would cause each file close // to wait until all operations have completed. f.Close() return nil diff --git a/testutils/cli/testutil.go b/testutils/cli/testutil.go index fdaa008e..d2bd740f 100644 --- a/testutils/cli/testutil.go +++ b/testutils/cli/testutil.go @@ -73,7 +73,7 @@ func (c *Console) PressDown() { func (c *Console) Esc() { // I grabbed this value from here: gopkg.in/AlecAivazis/survey.v1/terminal/sequences.go // Originally I tried to use escape codes (https://en.wikipedia.org/wiki/ANSI_escape_code) - // but it didnt work + // but it didn't work _, err := c.Console.Write([]byte{27}) Expect(err).NotTo(HaveOccurred()) } diff --git a/testutils/consul.go b/testutils/consul.go index 6703a9b2..1f24f7cd 100644 --- a/testutils/consul.go +++ b/testutils/consul.go @@ -39,7 +39,7 @@ func NewConsulFactory() (*ConsulFactory, error) { set -ex CID=$(docker run -d %s /bin/sh -c exit) -# just print the image sha for repoducibility +# just print the image sha for reproducibility echo "Using Consul Image:" docker inspect %s -f "{{.RepoDigests}}" diff --git a/testutils/kubernetes.go b/testutils/kubernetes.go index cf4663ec..d8f32665 100644 --- a/testutils/kubernetes.go +++ b/testutils/kubernetes.go @@ -29,7 +29,7 @@ func SetupKubeForTest(namespace string) error { if context == "" { current, err := KubectlOut("config", "current-context") if err != nil { - return errors.Wrap(err, "getting currrent context") + return errors.Wrap(err, "getting current context") } context = strings.TrimSuffix(current, "\n") } diff --git a/testutils/runners/consul/consul.go b/testutils/runners/consul/consul.go index a9fe1234..87fc7677 100644 --- a/testutils/runners/consul/consul.go +++ b/testutils/runners/consul/consul.go @@ -51,7 +51,7 @@ func NewConsulFactory() (*ConsulFactory, error) { set -ex CID=$(docker run -d %s /bin/sh -c exit) -# just print the image sha for repoducibility +# just print the image sha for reproducibility echo "Using Consul Image:" docker inspect %s -f "{{.RepoDigests}}" diff --git a/testutils/vault.go b/testutils/vault.go index 7bfb665f..52d0c25f 100644 --- a/testutils/vault.go +++ b/testutils/vault.go @@ -45,7 +45,7 @@ func NewVaultFactory() (*VaultFactory, error) { set -ex CID=$(docker run -d %s /bin/sh -c exit) -# just print the image sha for repoducibility +# just print the image sha for reproducibility echo "Using Vault Image:" docker inspect %s -f "{{.RepoDigests}}" diff --git a/versionutils/version_test.go b/versionutils/version_test.go index 5ad57adf..d060cea9 100644 --- a/versionutils/version_test.go +++ b/versionutils/version_test.go @@ -16,7 +16,7 @@ var _ = Describe("Version", func() { Expect(versionutils.MatchesRegex("v1.0.0")).To(BeTrue()) Expect(versionutils.MatchesRegex("v1.0.0-rc1")).To(BeTrue()) Expect(versionutils.MatchesRegex("v1.0.0-rc10")).To(BeTrue(), "should allow versions with 2 digits") - Expect(versionutils.MatchesRegex("v0.5.20-rc100")).To(BeTrue(), "should allow verions with 3 digits") + Expect(versionutils.MatchesRegex("v0.5.20-rc100")).To(BeTrue(), "should allow versions with 3 digits") Expect(versionutils.MatchesRegex("v0.0.0-rc1")).To(BeTrue()) Expect(versionutils.MatchesRegex("0.1.2")).To(BeFalse()) Expect(versionutils.MatchesRegex("v1.2")).To(BeFalse())