From 632678a461a9d102016b0a8b47b7d052ec563c8b Mon Sep 17 00:00:00 2001 From: kongxs <2008kongxiangsheng@163.com> Date: Tue, 1 Jun 2021 06:49:29 +0800 Subject: [PATCH] Fix spelling mistake (#8879) * Fix spelling mistake Signed-off-by: kjinan <2008kongxiangsheng@163.com> * Update discovery/kubernetes/endpoints.go Co-authored-by: Julien Pivotto Signed-off-by: kjinan <2008kongxiangsheng@163.com> Co-authored-by: Julien Pivotto --- discovery/kubernetes/endpoints.go | 2 +- discovery/kubernetes/kubernetes_test.go | 4 ++-- storage/interface.go | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/discovery/kubernetes/endpoints.go b/discovery/kubernetes/endpoints.go index c60bf3543..ed3bfaf50 100644 --- a/discovery/kubernetes/endpoints.go +++ b/discovery/kubernetes/endpoints.go @@ -221,7 +221,7 @@ func (e *Endpoints) buildEndpoints(eps *apiv1.Endpoints) *targetgroup.Group { endpointsNameLabel: lv(eps.Name), } e.addServiceLabels(eps.Namespace, eps.Name, tg) - //add endponits labels metadata + // Add endpoints labels metadata. for k, v := range eps.Labels { ln := strutil.SanitizeLabelName(k) tg.Labels[model.LabelName(endpointsLabelPrefix+ln)] = lv(v) diff --git a/discovery/kubernetes/kubernetes_test.go b/discovery/kubernetes/kubernetes_test.go index 7b3de45a3..087c52fa9 100644 --- a/discovery/kubernetes/kubernetes_test.go +++ b/discovery/kubernetes/kubernetes_test.go @@ -110,8 +110,8 @@ func (d k8sDiscoveryTest) Run(t *testing.T) { } } -// readResultWithTimeout reads all targegroups from channel with timeout. -// It merges targegroups by source and sends the result to result channel. +// readResultWithTimeout reads all targetgroups from channel with timeout. +// It merges targetgroups by source and sends the result to result channel. func readResultWithTimeout(t *testing.T, ch <-chan []*targetgroup.Group, max int, timeout time.Duration, resChan chan<- map[string]*targetgroup.Group) { res := make(map[string]*targetgroup.Group) Loop: diff --git a/storage/interface.go b/storage/interface.go index 5583dcf02..e017d9317 100644 --- a/storage/interface.go +++ b/storage/interface.go @@ -106,7 +106,7 @@ type ChunkQuerier interface { // LabelQuerier provides querying access over labels. type LabelQuerier interface { // LabelValues returns all potential values for a label name. - // It is not safe to use the strings beyond the lifefime of the querier. + // It is not safe to use the strings beyond the lifetime of the querier. // If matchers are specified the returned result set is reduced // to label values of metrics matching the matchers. LabelValues(name string, matchers ...*labels.Matcher) ([]string, Warnings, error)