From d2bab218ddef3fc3f444038420dd500c0e8bc068 Mon Sep 17 00:00:00 2001 From: saltbo Date: Wed, 13 Jul 2022 10:16:51 +0800 Subject: [PATCH] fix: update the typo code comment --- pkg/generated/openapi/zz_generated.openapi.go | 2 +- staging/src/k8s.io/apimachinery/pkg/util/wait/wait.go | 2 +- staging/src/k8s.io/client-go/rest/request.go | 6 +++--- staging/src/k8s.io/client-go/rest/request_test.go | 2 +- staging/src/k8s.io/kubelet/config/v1beta1/types.go | 2 +- test/e2e/apimachinery/crd_validation_rules.go | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/pkg/generated/openapi/zz_generated.openapi.go b/pkg/generated/openapi/zz_generated.openapi.go index 8fd882d3eb6..dde18b2e6c5 100644 --- a/pkg/generated/openapi/zz_generated.openapi.go +++ b/pkg/generated/openapi/zz_generated.openapi.go @@ -53330,7 +53330,7 @@ func schema_k8sio_kubelet_config_v1beta1_KubeletConfiguration(ref common.Referen }, "kernelMemcgNotification": { SchemaProps: spec.SchemaProps{ - Description: "kernelMemcgNotification, if set, instructs the the kubelet to integrate with the kernel memcg notification for determining if memory eviction thresholds are exceeded rather than polling. Default: false", + Description: "kernelMemcgNotification, if set, instructs the kubelet to integrate with the kernel memcg notification for determining if memory eviction thresholds are exceeded rather than polling. Default: false", Type: []string{"boolean"}, Format: "", }, diff --git a/staging/src/k8s.io/apimachinery/pkg/util/wait/wait.go b/staging/src/k8s.io/apimachinery/pkg/util/wait/wait.go index 7aec1ec27ac..d1469d7972d 100644 --- a/staging/src/k8s.io/apimachinery/pkg/util/wait/wait.go +++ b/staging/src/k8s.io/apimachinery/pkg/util/wait/wait.go @@ -566,7 +566,7 @@ func PollImmediateInfiniteWithContext(ctx context.Context, interval time.Duratio return poll(ctx, true, poller(interval, 0), condition) } -// Internally used, each of the the public 'Poll*' function defined in this +// Internally used, each of the public 'Poll*' function defined in this // package should invoke this internal function with appropriate parameters. // ctx: the context specified by the caller, for infinite polling pass // a context that never gets cancelled or expired. diff --git a/staging/src/k8s.io/client-go/rest/request.go b/staging/src/k8s.io/client-go/rest/request.go index 3a1560df0dc..bfc6ac64a56 100644 --- a/staging/src/k8s.io/client-go/rest/request.go +++ b/staging/src/k8s.io/client-go/rest/request.go @@ -710,7 +710,7 @@ func updateURLMetrics(ctx context.Context, req *Request, resp *http.Response, er if err != nil { metrics.RequestResult.Increment(ctx, "", req.verb, url) } else { - //Metrics for failure codes + // Metrics for failure codes metrics.RequestResult.Increment(ctx, strconv.Itoa(resp.StatusCode), req.verb, url) } } @@ -823,7 +823,7 @@ func (r *Request) newHTTPRequest(ctx context.Context) (*http.Request, error) { // fn at most once. It will return an error if a problem occurred prior to connecting to the // server - the provided function is responsible for handling server errors. func (r *Request) request(ctx context.Context, fn func(*http.Request, *http.Response)) error { - //Metrics for total request latency + // Metrics for total request latency start := time.Now() defer func() { metrics.RequestLatency.Observe(ctx, r.verb, *r.URL(), time.Since(start)) @@ -892,7 +892,7 @@ func (r *Request) request(ctx context.Context, fn func(*http.Request, *http.Resp done := func() bool { defer readAndCloseResponseBody(resp) - // if the the server returns an error in err, the response will be nil. + // if the server returns an error in err, the response will be nil. f := func(req *http.Request, resp *http.Response) { if resp == nil { return diff --git a/staging/src/k8s.io/client-go/rest/request_test.go b/staging/src/k8s.io/client-go/rest/request_test.go index 01e18251815..09f731f2a1b 100644 --- a/staging/src/k8s.io/client-go/rest/request_test.go +++ b/staging/src/k8s.io/client-go/rest/request_test.go @@ -2564,7 +2564,7 @@ func TestRequestWatchWithRetry(t *testing.T) { testRequestWithRetry(t, "Watch", func(ctx context.Context, r *Request) { w, err := r.Watch(ctx) if err == nil { - // in this test the the response body returned by the server is always empty, + // in this test the response body returned by the server is always empty, // this will cause StreamWatcher.receive() to: // - return an io.EOF to indicate that the watch closed normally and // - then close the io.Reader diff --git a/staging/src/k8s.io/kubelet/config/v1beta1/types.go b/staging/src/k8s.io/kubelet/config/v1beta1/types.go index 16ecc805461..2504f2aa253 100644 --- a/staging/src/k8s.io/kubelet/config/v1beta1/types.go +++ b/staging/src/k8s.io/kubelet/config/v1beta1/types.go @@ -664,7 +664,7 @@ type KubeletConfiguration struct { // Default: "" // +optional ProviderID string `json:"providerID,omitempty"` - // kernelMemcgNotification, if set, instructs the the kubelet to integrate with the + // kernelMemcgNotification, if set, instructs the kubelet to integrate with the // kernel memcg notification for determining if memory eviction thresholds are // exceeded rather than polling. // Default: false diff --git a/test/e2e/apimachinery/crd_validation_rules.go b/test/e2e/apimachinery/crd_validation_rules.go index 1e020a33776..9228f921c18 100644 --- a/test/e2e/apimachinery/crd_validation_rules.go +++ b/test/e2e/apimachinery/crd_validation_rules.go @@ -62,7 +62,7 @@ var _ = SIGDescribe("CustomResourceValidationRules [Privileged:ClusterAdmin][Alp } // for all new CRD validation features that should be E2E-tested, add them - // into this schema and then add CR requests to the end of the the test + // into this schema and then add CR requests to the end of the test // below ("MUST NOT fail validation...") instead of writing a new and // separate test var schemaWithValidationExpression = unmarshallSchema([]byte(`{