all: fix some typos (#13863)

Signed-off-by: carehabit <shenyuting@outlook.com>
This commit is contained in:
carehabit 2024-04-02 00:06:05 +08:00 committed by GitHub
parent 5e2caa32e7
commit a672662073
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 8 additions and 8 deletions

View File

@ -25,20 +25,20 @@ import (
func TestLabels_String(t *testing.T) { func TestLabels_String(t *testing.T) {
cases := []struct { cases := []struct {
lables Labels labels Labels
expected string expected string
}{ }{
{ {
lables: FromStrings("t1", "t1", "t2", "t2"), labels: FromStrings("t1", "t1", "t2", "t2"),
expected: "{t1=\"t1\", t2=\"t2\"}", expected: "{t1=\"t1\", t2=\"t2\"}",
}, },
{ {
lables: Labels{}, labels: Labels{},
expected: "{}", expected: "{}",
}, },
} }
for _, c := range cases { for _, c := range cases {
str := c.lables.String() str := c.labels.String()
require.Equal(t, c.expected, str) require.Equal(t, c.expected, str)
} }
} }

View File

@ -1045,7 +1045,7 @@ func visitStringMatcher(matcher StringMatcher, callback func(matcher StringMatch
visitStringMatcher(entry, callback) visitStringMatcher(entry, callback)
} }
// No nested matchers for the folling ones. // No nested matchers for the following ones.
case emptyStringMatcher: case emptyStringMatcher:
case *equalStringMatcher: case *equalStringMatcher:
case *equalMultiStringSliceMatcher: case *equalMultiStringSliceMatcher:

View File

@ -6,4 +6,4 @@ groups:
labels: labels:
instance: localhost instance: localhost
annotation: annotation:
summary: annonations is written without s above summary: annotations is written without s above

View File

@ -409,7 +409,7 @@ func generateOTLPWriteRequest(t *testing.T) pmetricotlp.ExportRequest {
// Generate One Counter, One Gauge, One Histogram, One Exponential-Histogram // 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 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() timestamp := time.Now()

View File

@ -42,7 +42,7 @@ import (
"github.com/prometheus/prometheus/tsdb/chunks" "github.com/prometheus/prometheus/tsdb/chunks"
tsdb_errors "github.com/prometheus/prometheus/tsdb/errors" tsdb_errors "github.com/prometheus/prometheus/tsdb/errors"
"github.com/prometheus/prometheus/tsdb/fileutil" "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/tsdbutil"
"github.com/prometheus/prometheus/tsdb/wlog" "github.com/prometheus/prometheus/tsdb/wlog"
) )