From 0913324668fcab7eac0bc75d6de52704fb647ec0 Mon Sep 17 00:00:00 2001 From: carrychair <137268757+carrychair@users.noreply.github.com> Date: Mon, 11 Mar 2024 20:55:18 +0800 Subject: [PATCH] Chore: Remove repetitive words (#84132) remove repetitive words Signed-off-by: carrychair --- pkg/apis/datasource/v0alpha1/types.go | 2 +- pkg/apiserver/builder/openapi.go | 2 +- pkg/build/config/version.go | 2 +- pkg/expr/mathexp/types.go | 2 +- pkg/middleware/request_test.go | 2 +- pkg/tsdb/grafana-pyroscope-datasource/query.go | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pkg/apis/datasource/v0alpha1/types.go b/pkg/apis/datasource/v0alpha1/types.go index 7f72cd32dae..509810ff0c2 100644 --- a/pkg/apis/datasource/v0alpha1/types.go +++ b/pkg/apis/datasource/v0alpha1/types.go @@ -39,6 +39,6 @@ type HealthCheckResult struct { // Optional description for the data source Message string `json:"message,omitempty"` - // Spec depends on the the plugin + // Spec depends on the plugin Details *common.Unstructured `json:"details,omitempty"` } diff --git a/pkg/apiserver/builder/openapi.go b/pkg/apiserver/builder/openapi.go index 678b0d52075..0790ba733aa 100644 --- a/pkg/apiserver/builder/openapi.go +++ b/pkg/apiserver/builder/openapi.go @@ -28,7 +28,7 @@ func GetOpenAPIDefinitions(builders []APIGroupBuilder) common.GetOpenAPIDefiniti } } -// Modify the the OpenAPI spec to include the additional routes. +// Modify the OpenAPI spec to include the additional routes. // Currently this requires: https://github.com/kubernetes/kube-openapi/pull/420 // In future k8s release, the hook will use Config3 rather than the same hook for both v2 and v3 func getOpenAPIPostProcessor(version string, builders []APIGroupBuilder) func(*spec3.OpenAPI) (*spec3.OpenAPI, error) { diff --git a/pkg/build/config/version.go b/pkg/build/config/version.go index 05b99cf4678..2e93e0a6a22 100644 --- a/pkg/build/config/version.go +++ b/pkg/build/config/version.go @@ -57,7 +57,7 @@ func (md *Metadata) GetReleaseMode() (ReleaseMode, error) { return md.ReleaseMode, nil } -// VersionMap is a map of versions. Each key of the Versions map is an event that uses the the config as the value for that key. +// VersionMap is a map of versions. Each key of the Versions map is an event that uses the config as the value for that key. // For example, the 'pull_request' key will have data in it that might cause Grafana to be built differently in a pull request, // than the way it will be built in 'main' type VersionMap map[VersionMode]BuildConfig diff --git a/pkg/expr/mathexp/types.go b/pkg/expr/mathexp/types.go index a5b5ba456a4..ba9115c7443 100644 --- a/pkg/expr/mathexp/types.go +++ b/pkg/expr/mathexp/types.go @@ -196,7 +196,7 @@ func (ff *Float64Field) GetValue(idx int) *float64 { return &f } -// Len returns the the length of the field. +// Len returns the length of the field. func (ff *Float64Field) Len() int { df := data.Field(*ff) return df.Len() diff --git a/pkg/middleware/request_test.go b/pkg/middleware/request_test.go index 6e4c7526ccf..ea9ea4fad66 100644 --- a/pkg/middleware/request_test.go +++ b/pkg/middleware/request_test.go @@ -42,7 +42,7 @@ func TestCanGetRouteNameFromContext(t *testing.T) { func TestOperationNameCanOnlyBeSetOnce(t *testing.T) { req, _ := http.NewRequestWithContext(context.Background(), http.MethodPost, "https://grafana.com", nil) - // set the the initial operation name + // set the initial operation name req = addRouteNameToContext(req, "first") // check that the operation name is set correctly diff --git a/pkg/tsdb/grafana-pyroscope-datasource/query.go b/pkg/tsdb/grafana-pyroscope-datasource/query.go index 9bbb3856980..f62df698798 100644 --- a/pkg/tsdb/grafana-pyroscope-datasource/query.go +++ b/pkg/tsdb/grafana-pyroscope-datasource/query.go @@ -215,7 +215,7 @@ func levelsToTree(levels []*Level, names []string) *ProfileTree { // If we still have levels to go, this should not happen. Something is probably wrong with the flamebearer data. if len(parentsStack) == 0 { - logger.Error("ParentsStack is empty but we are not at the the last level", "currentLevel", currentLevel, "function", logEntrypoint()) + logger.Error("ParentsStack is empty but we are not at the last level", "currentLevel", currentLevel, "function", logEntrypoint()) break }