From 276ca6a883bed19c2c78c356f93e0b939841f584 Mon Sep 17 00:00:00 2001 From: cui fliter Date: Tue, 25 Apr 2023 14:19:16 +0800 Subject: [PATCH] fix some comments Signed-off-by: cui fliter --- CONTRIBUTING.md | 2 +- discovery/kubernetes/node.go | 2 +- model/labels/labels.go | 2 +- model/labels/labels_string.go | 2 +- tsdb/db.go | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 2fbed3880..57055ef38 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -85,7 +85,7 @@ The PromQL parser grammar is located in `promql/parser/generated_parser.y` and i The parser is built using [goyacc](https://pkg.go.dev/golang.org/x/tools/cmd/goyacc) If doing some sort of debugging, then it is possible to add some verbose output. After generating the parser, then you -can modify the the `./promql/parser/generated_parser.y.go` manually. +can modify the `./promql/parser/generated_parser.y.go` manually. ```golang // As of writing this was somewhere around line 600. diff --git a/discovery/kubernetes/node.go b/discovery/kubernetes/node.go index 16a06e7a0..d0a6d2780 100644 --- a/discovery/kubernetes/node.go +++ b/discovery/kubernetes/node.go @@ -209,7 +209,7 @@ func (n *Node) buildNode(node *apiv1.Node) *targetgroup.Group { return tg } -// nodeAddresses returns the provided node's address, based on the priority: +// nodeAddress returns the provided node's address, based on the priority: // 1. NodeInternalIP // 2. NodeInternalDNS // 3. NodeExternalIP diff --git a/model/labels/labels.go b/model/labels/labels.go index 93524ddcf..4f8aedd49 100644 --- a/model/labels/labels.go +++ b/model/labels/labels.go @@ -622,7 +622,7 @@ func (b *ScratchBuilder) Sort() { slices.SortFunc(b.add, func(a, b Label) bool { return a.Name < b.Name }) } -// Asssign is for when you already have a Labels which you want this ScratchBuilder to return. +// Assign is for when you already have a Labels which you want this ScratchBuilder to return. func (b *ScratchBuilder) Assign(ls Labels) { b.add = append(b.add[:0], ls...) // Copy on top of our slice, so we don't retain the input slice. } diff --git a/model/labels/labels_string.go b/model/labels/labels_string.go index ff46103eb..da8229796 100644 --- a/model/labels/labels_string.go +++ b/model/labels/labels_string.go @@ -799,7 +799,7 @@ func (b *ScratchBuilder) Sort() { slices.SortFunc(b.add, func(a, b Label) bool { return a.Name < b.Name }) } -// Asssign is for when you already have a Labels which you want this ScratchBuilder to return. +// Assign is for when you already have a Labels which you want this ScratchBuilder to return. func (b *ScratchBuilder) Assign(l Labels) { b.output = l } diff --git a/tsdb/db.go b/tsdb/db.go index de37bdb4f..61333c972 100644 --- a/tsdb/db.go +++ b/tsdb/db.go @@ -1841,7 +1841,7 @@ func (db *DB) Querier(_ context.Context, mint, maxt int64) (storage.Querier, err return storage.NewMergeQuerier(blockQueriers, nil, storage.ChainedSeriesMerge), nil } -// blockQueriersForRange returns individual block chunk queriers from the persistent blocks, in-order head block, and the +// blockChunkQuerierForRange returns individual block chunk queriers from the persistent blocks, in-order head block, and the // out-of-order head block, overlapping with the given time range. func (db *DB) blockChunkQuerierForRange(mint, maxt int64) ([]storage.ChunkQuerier, error) { var blocks []BlockReader