From 00f68c12a81690693442f3fda24c53b192595cff Mon Sep 17 00:00:00 2001 From: HowJMay Date: Thu, 23 Jan 2020 23:35:38 +0800 Subject: [PATCH] fix typos Fix typos --- api/internal/crawl/crawler/github/queries.go | 2 +- api/internal/crawl/crawler/github/split_search_ranges.go | 4 ++-- api/internal/crawl/index/kustomize.go | 2 +- api/internal/tools/tools.go | 2 +- cmd/config/docs/api-conventions/config-io.md | 2 +- cmd/config/docs/api-conventions/functions-impl.md | 2 +- cmd/config/internal/generateddocs/api/docs.go | 4 ++-- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/api/internal/crawl/crawler/github/queries.go b/api/internal/crawl/crawler/github/queries.go index ba05af38f..444ee3d10 100644 --- a/api/internal/crawl/crawler/github/queries.go +++ b/api/internal/crawl/crawler/github/queries.go @@ -166,7 +166,7 @@ type request struct { query Query } -// CopyWith copies the requests and adds the extra query parameters. Usefull +// CopyWith copies the requests and adds the extra query parameters. It is useful // for dynamically adding sizes to a filename only query without modifying it. func (r request) CopyWith(queryParams ...queryField) request { cpy := r diff --git a/api/internal/crawl/crawler/github/split_search_ranges.go b/api/internal/crawl/crawler/github/split_search_ranges.go index 1322932f4..8d9037478 100644 --- a/api/internal/crawl/crawler/github/split_search_ranges.go +++ b/api/internal/crawl/crawler/github/split_search_ranges.go @@ -93,7 +93,7 @@ package github // apiCallsPerResult * 10(pages) * 100(resultsPerPage) * totalResults / 1000 // = apiCallsPerResult * totalResults. // -// So it could very well take apiCallsPerResult * 50 times longer to acutally +// So it could very well take apiCallsPerResult * 50 times longer to actually // fetch the results (assuming the quotas for the API calls are the same as the // search API), than it does to perform these range searches. @@ -139,7 +139,7 @@ type cachedSearch interface { // problematic). The current cache implementation looks at the // predecessor entry to find out if the current value is monotonic. // This is where the bit trick is used, since each step in the binary -// search is adding or ommiting to add a decreasing power of 2 to the query +// search is adding or omitting to add a decreasing power of 2 to the query // value, we can remove the least significant set bit to find the // predecessor in constant time. Ultimately since the search is rate // limited, we could also easily afford to compute this in linear time diff --git a/api/internal/crawl/index/kustomize.go b/api/internal/crawl/index/kustomize.go index 7e2e7b104..f7b20f13f 100644 --- a/api/internal/crawl/index/kustomize.go +++ b/api/internal/crawl/index/kustomize.go @@ -270,7 +270,7 @@ func (it *KustomizeIterator) Value() KustomizeResult { return it.scrollImpl } -// Check if any errors have occured. +// Check if any errors have occurred. func (it *KustomizeIterator) Err() error { return it.err } diff --git a/api/internal/tools/tools.go b/api/internal/tools/tools.go index ac7ae28e9..7be4ef948 100644 --- a/api/internal/tools/tools.go +++ b/api/internal/tools/tools.go @@ -4,7 +4,7 @@ // SPDX-License-Identifier: Apache-2.0 // This file exists to automatically trigger installs -// of the given tools, and is the offical 'unofficial' +// of the given tools, and is the official 'unofficial' // way to declare a dependence on a Go binary until // some better technique comes along. diff --git a/cmd/config/docs/api-conventions/config-io.md b/cmd/config/docs/api-conventions/config-io.md index 44337b4f4..35b013608 100644 --- a/cmd/config/docs/api-conventions/config-io.md +++ b/cmd/config/docs/api-conventions/config-io.md @@ -29,7 +29,7 @@ metadata: ### `config.kubernetes.io/index` Records the index of a Resource in file. In a multi-object YAML file, Resources are separated -by three dashes (`---`), and the index represents the positon of the Resource starting from zero. +by three dashes (`---`), and the index represents the position of the Resource starting from zero. This annotation **SHOULD** be set when reading Resources from files. It **SHOULD** be unset when writing Resources to files. diff --git a/cmd/config/docs/api-conventions/functions-impl.md b/cmd/config/docs/api-conventions/functions-impl.md index c56ab52a8..c0e8548c3 100644 --- a/cmd/config/docs/api-conventions/functions-impl.md +++ b/cmd/config/docs/api-conventions/functions-impl.md @@ -129,7 +129,7 @@ spec: ### Output -The function is invoked using by runing `kustomize config run dir/`. +The function is invoked using byrunning `kustomize config run dir/`. `dir/my-instance_deployment.yaml` contains the Deployment: diff --git a/cmd/config/internal/generateddocs/api/docs.go b/cmd/config/internal/generateddocs/api/docs.go index 54849a963..b7a3a512d 100644 --- a/cmd/config/internal/generateddocs/api/docs.go +++ b/cmd/config/internal/generateddocs/api/docs.go @@ -33,7 +33,7 @@ Example: ### ` + "`" + `config.kubernetes.io/index` + "`" + ` Records the index of a Resource in file. In a multi-object YAML file, Resources are separated -by three dashes (` + "`" + `---` + "`" + `), and the index represents the positon of the Resource starting from zero. +by three dashes (` + "`" + `---` + "`" + `), and the index represents the position of the Resource starting from zero. This annotation **SHOULD** be set when reading Resources from files. It **SHOULD** be unset when writing Resources to files. @@ -187,7 +187,7 @@ are passed to the Function through the ` + "`" + `ResourceList.functionConfig` + ### Output -The function is invoked using by runing ` + "`" + `kustomize config run dir/` + "`" + `. +The function is invoked using byrunning ` + "`" + `kustomize config run dir/` + "`" + `. ` + "`" + `dir/my-instance_deployment.yaml` + "`" + ` contains the Deployment: