Forráskód Böngészése

Fix misspell issues

See,
$ gometalinter --disable-all --enable misspell --deadline 10m --vendor ./...
pkg/api/dtos/alerting_test.go:32:13:warning: "expectes" is a misspelling of "expects" (misspell)
pkg/api/static/static.go:2:18:warning: "Unknwon" is a misspelling of "Unknown" (misspell)
pkg/components/imguploader/azureblobuploader.go:55:48:warning: "conatiner" is a misspelling of "container" (misspell)
pkg/login/ldap_settings.go:51:115:warning: "compatability" is a misspelling of "compatibility" (misspell)
pkg/middleware/auth_proxy_test.go:122:22:warning: "Destory" is a misspelling of "Destroy" (misspell)
pkg/middleware/logger.go:2:18:warning: "Unknwon" is a misspelling of "Unknown" (misspell)
pkg/services/notifications/codes.go:9:13:warning: "Unknwon" is a misspelling of "Unknown" (misspell)
pkg/services/session/mysql.go:170:3:warning: "Destory" is a misspelling of "Destroy" (misspell)
pkg/services/session/mysql.go:171:24:warning: "Destory" is a misspelling of "Destroy" (misspell)
pkg/services/session/session.go:95:4:warning: "Destory" is a misspelling of "Destroy" (misspell)
pkg/services/session/session.go:96:1:warning: "Destory" is a misspelling of "Destroy" (misspell)
pkg/services/session/session.go:167:25:warning: "Destory" is a misspelling of "Destroy" (misspell)
pkg/setting/setting.go:1:18:warning: "Unknwon" is a misspelling of "Unknown" (misspell)
pkg/tsdb/cloudwatch/cloudwatch.go:199:14:warning: "resolutin" is a misspelling of "resolutions" (misspell)
pkg/tsdb/cloudwatch/cloudwatch.go:270:15:warning: "resolutin" is a misspelling of "resolutions" (misspell)
pkg/tsdb/elasticsearch/response_parser.go:531:24:warning: "Unkown" is a misspelling of "Unknown" (misspell)
pkg/tsdb/elasticsearch/client/search_request.go:113:7:warning: "initaite" is a misspelling of "initiate" (misspell)

Note: Unknwon is a library name, and Destory a mysql typo.
Mario Trangoni 7 éve
szülő
commit
3689bb778c

+ 1 - 1
pkg/api/dtos/alerting_test.go

@@ -29,7 +29,7 @@ func TestFormatShort(t *testing.T) {
 		}
 
 		if parsed != tc.interval {
-			t.Errorf("expectes the parsed duration to equal the interval. Got %v expected: %v", parsed, tc.interval)
+			t.Errorf("expects the parsed duration to equal the interval. Got %v expected: %v", parsed, tc.interval)
 		}
 	}
 }

+ 1 - 1
pkg/components/imguploader/azureblobuploader.go

@@ -52,7 +52,7 @@ func (az *AzureBlobUploader) Upload(ctx context.Context, imageDiskPath string) (
 	}
 	randomFileName := util.GetRandomString(30) + ".png"
 	// upload image
-	az.log.Debug("Uploading image to azure_blob", "conatiner_name", az.container_name, "blob_name", randomFileName)
+	az.log.Debug("Uploading image to azure_blob", "container_name", az.container_name, "blob_name", randomFileName)
 	resp, err := blob.FileUpload(az.container_name, randomFileName, file)
 	if err != nil {
 		return "", err

+ 1 - 1
pkg/login/ldap_settings.go

@@ -48,7 +48,7 @@ type LdapAttributeMap struct {
 type LdapGroupToOrgRole struct {
 	GroupDN        string     `toml:"group_dn"`
 	OrgId          int64      `toml:"org_id"`
-	IsGrafanaAdmin *bool      `toml:"grafana_admin"` // This is a pointer to know if it was set or not (for backwards compatability)
+	IsGrafanaAdmin *bool      `toml:"grafana_admin"` // This is a pointer to know if it was set or not (for backwards compatibility)
 	OrgRole        m.RoleType `toml:"org_role"`
 }
 

+ 2 - 2
pkg/tsdb/cloudwatch/cloudwatch.go

@@ -196,7 +196,7 @@ func (e *CloudWatchExecutor) executeQuery(ctx context.Context, query *CloudWatch
 		params.ExtendedStatistics = query.ExtendedStatistics
 	}
 
-	// 1 minutes resolutin metrics is stored for 15 days, 15 * 24 * 60 = 21600
+	// 1 minutes resolution metrics is stored for 15 days, 15 * 24 * 60 = 21600
 	if query.HighResolution && (((endTime.Unix() - startTime.Unix()) / int64(query.Period)) > 21600) {
 		return nil, errors.New("too long query period")
 	}
@@ -267,7 +267,7 @@ func (e *CloudWatchExecutor) executeGetMetricDataQuery(ctx context.Context, regi
 		ScanBy:    aws.String("TimestampAscending"),
 	}
 	for _, query := range queries {
-		// 1 minutes resolutin metrics is stored for 15 days, 15 * 24 * 60 = 21600
+		// 1 minutes resolution metrics is stored for 15 days, 15 * 24 * 60 = 21600
 		if query.HighResolution && (((endTime.Unix() - startTime.Unix()) / int64(query.Period)) > 21600) {
 			return nil, errors.New("too long query period")
 		}

+ 1 - 1
pkg/tsdb/elasticsearch/client/search_request.go

@@ -110,7 +110,7 @@ func (b *SearchRequestBuilder) Query() *QueryBuilder {
 	return b.queryBuilder
 }
 
-// Agg initaite and returns a new aggregation builder
+// Agg initiate and returns a new aggregation builder
 func (b *SearchRequestBuilder) Agg() AggBuilder {
 	aggBuilder := newAggBuilder()
 	b.aggBuilders = append(b.aggBuilders, aggBuilder)