Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typos #539

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion changelog/v0.10.11/git-mv.yaml
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion changelog/v0.10.27/logrus.yaml
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion changelog/v0.22.3/configurable-changelog-dir.yaml
Original file line number Diff line number Diff line change
@@ -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.
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.
2 changes: 1 addition & 1 deletion changelog/v0.5.1/cluster-lock-timeout.yaml
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion changelog/v0.7.14/clicore.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion changeloggenutils/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion changeloggenutils/minor_release.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions changelogutils/cmd/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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**

Expand Down Expand Up @@ -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)

Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion changelogutils/reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}

Expand Down
2 changes: 1 addition & 1 deletion changelogutils/validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
2 changes: 1 addition & 1 deletion cliutils/cli_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion cliutils/port_forward.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
2 changes: 1 addition & 1 deletion errgroup/errgroup.go
Original file line number Diff line number Diff line change
@@ -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

Expand Down
8 changes: 4 additions & 4 deletions gcloudutils/tags.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
type Tags []string

const (
seperator = "_"
separator = "_"
tagConst = "tag"
shaConst = "sha"
refConst = "ref"
Expand All @@ -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 {
Expand Down Expand Up @@ -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]
}
Expand Down
2 changes: 1 addition & 1 deletion grpcutils/dial_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions healthchecker/grpc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand All @@ -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)
})

Expand Down
8 changes: 4 additions & 4 deletions helmutils/helm_indent_finder.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{}
Expand All @@ -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
Expand All @@ -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
}
Expand Down Expand Up @@ -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]
Expand Down
2 changes: 1 addition & 1 deletion helmutils/helm_indent_finder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion securityscanutils/commands/scan_version.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down
2 changes: 1 addition & 1 deletion securityscanutils/trivy_scanner.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
4 changes: 2 additions & 2 deletions surveyutils/input_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion tarutils/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion testutils/cli/testutil.go
Original file line number Diff line number Diff line change
Expand Up @@ -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())
}
Expand Down
2 changes: 1 addition & 1 deletion testutils/consul.go
Original file line number Diff line number Diff line change
Expand Up @@ -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}}"

Expand Down
2 changes: 1 addition & 1 deletion testutils/kubernetes.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
Expand Down
2 changes: 1 addition & 1 deletion testutils/runners/consul/consul.go
Original file line number Diff line number Diff line change
Expand Up @@ -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}}"

Expand Down
2 changes: 1 addition & 1 deletion testutils/vault.go
Original file line number Diff line number Diff line change
Expand Up @@ -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}}"

Expand Down
2 changes: 1 addition & 1 deletion versionutils/version_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down
Loading