From a67266207377f8294dcd4bd3043ecfe6dac4a086 Mon Sep 17 00:00:00 2001 From: carehabit <165479941+carehabit@users.noreply.github.com> Date: Tue, 2 Apr 2024 00:06:05 +0800 Subject: [PATCH] all: fix some typos (#13863) Signed-off-by: carehabit --- model/labels/labels_test.go | 8 ++++---- model/labels/regexp_test.go | 2 +- model/rulefmt/testdata/bad_field.bad.yaml | 2 +- storage/remote/write_test.go | 2 +- tsdb/db.go | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/model/labels/labels_test.go b/model/labels/labels_test.go index 90ae41ccea..5ec7764ca9 100644 --- a/model/labels/labels_test.go +++ b/model/labels/labels_test.go @@ -25,20 +25,20 @@ import ( func TestLabels_String(t *testing.T) { cases := []struct { - lables Labels + labels Labels expected string }{ { - lables: FromStrings("t1", "t1", "t2", "t2"), + labels: FromStrings("t1", "t1", "t2", "t2"), expected: "{t1=\"t1\", t2=\"t2\"}", }, { - lables: Labels{}, + labels: Labels{}, expected: "{}", }, } for _, c := range cases { - str := c.lables.String() + str := c.labels.String() require.Equal(t, c.expected, str) } } diff --git a/model/labels/regexp_test.go b/model/labels/regexp_test.go index fc21459ed0..ac48bdc5b5 100644 --- a/model/labels/regexp_test.go +++ b/model/labels/regexp_test.go @@ -1045,7 +1045,7 @@ func visitStringMatcher(matcher StringMatcher, callback func(matcher StringMatch visitStringMatcher(entry, callback) } - // No nested matchers for the folling ones. + // No nested matchers for the following ones. case emptyStringMatcher: case *equalStringMatcher: case *equalMultiStringSliceMatcher: diff --git a/model/rulefmt/testdata/bad_field.bad.yaml b/model/rulefmt/testdata/bad_field.bad.yaml index d85eab1e5f..729bbadfbc 100644 --- a/model/rulefmt/testdata/bad_field.bad.yaml +++ b/model/rulefmt/testdata/bad_field.bad.yaml @@ -6,4 +6,4 @@ groups: labels: instance: localhost annotation: - summary: annonations is written without s above + summary: annotations is written without s above diff --git a/storage/remote/write_test.go b/storage/remote/write_test.go index 4a9a3bafc4..c79ac3ab7d 100644 --- a/storage/remote/write_test.go +++ b/storage/remote/write_test.go @@ -409,7 +409,7 @@ func generateOTLPWriteRequest(t *testing.T) pmetricotlp.ExportRequest { // Generate One Counter, One Gauge, One Histogram, One Exponential-Histogram // with resource attributes: service.name="test-service", service.instance.id="test-instance", host.name="test-host" - // with metric attibute: foo.bar="baz" + // with metric attribute: foo.bar="baz" timestamp := time.Now() diff --git a/tsdb/db.go b/tsdb/db.go index 856a9a68a3..293ba646ea 100644 --- a/tsdb/db.go +++ b/tsdb/db.go @@ -42,7 +42,7 @@ import ( "github.com/prometheus/prometheus/tsdb/chunks" tsdb_errors "github.com/prometheus/prometheus/tsdb/errors" "github.com/prometheus/prometheus/tsdb/fileutil" - _ "github.com/prometheus/prometheus/tsdb/goversion" // Load the package into main to make sure minium Go version is met. + _ "github.com/prometheus/prometheus/tsdb/goversion" // Load the package into main to make sure minimum Go version is met. "github.com/prometheus/prometheus/tsdb/tsdbutil" "github.com/prometheus/prometheus/tsdb/wlog" )