From c35d47b41954dae0e9b5592cb327bf0896e78e26 Mon Sep 17 00:00:00 2001 From: Guangming Wang Date: Wed, 21 Aug 2019 22:41:24 +0800 Subject: [PATCH] cleanup: fix some typos in code comment (#1444) Signed-off-by: Guangming Wang --- pkg/compact/downsample/downsample.go | 4 ++-- pkg/promclient/promclient.go | 2 +- pkg/shipper/shipper.go | 2 +- pkg/ui/rule.go | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pkg/compact/downsample/downsample.go b/pkg/compact/downsample/downsample.go index f2e713ade6..3c1deb7ef2 100644 --- a/pkg/compact/downsample/downsample.go +++ b/pkg/compact/downsample/downsample.go @@ -191,7 +191,7 @@ func targetChunkCount(mint, maxt, inRes, outRes int64, count int) (x int) { return x } -// aggregator collects commulative stats for a stream of values. +// aggregator collects cumulative stats for a stream of values. type aggregator struct { total int // total samples processed count int // samples in current window @@ -199,7 +199,7 @@ type aggregator struct { min float64 // min of current window max float64 // max of current window counter float64 // total counter state since beginning - resets int // number of counter resests since beginning + resets int // number of counter resets since beginning last float64 // last added value } diff --git a/pkg/promclient/promclient.go b/pkg/promclient/promclient.go index a23253e945..ede6a3ebf6 100644 --- a/pkg/promclient/promclient.go +++ b/pkg/promclient/promclient.go @@ -403,7 +403,7 @@ func PromqlQueryInstant(ctx context.Context, logger log.Logger, base *url.URL, q func convertScalarJSONToVector(scalarJSONResult json.RawMessage) (model.Vector, error) { var ( // Do not specify exact length of the expected slice since JSON unmarshaling - // would make the leght fit the size and we won't be able to check the length afterwards. + // would make the length fit the size and we won't be able to check the length afterwards. resultPointSlice []json.RawMessage resultTime model.Time resultValue model.SampleValue diff --git a/pkg/shipper/shipper.go b/pkg/shipper/shipper.go index a2ce634f81..3a83d2490a 100644 --- a/pkg/shipper/shipper.go +++ b/pkg/shipper/shipper.go @@ -438,7 +438,7 @@ func hardlinkBlock(src, dst string) error { return nil } -// Meta defines the fomart thanos.shipper.json file that the shipper places in the data directory. +// Meta defines the format thanos.shipper.json file that the shipper places in the data directory. type Meta struct { Version int `json:"version"` Uploaded []ulid.ULID `json:"uploaded"` diff --git a/pkg/ui/rule.go b/pkg/ui/rule.go index 1de472866a..3d52c205a5 100644 --- a/pkg/ui/rule.go +++ b/pkg/ui/rule.go @@ -95,7 +95,7 @@ func ruleTmplFuncs(queryURL string) template.FuncMap { if minutes != 0 { return fmt.Sprintf("%s%dm %ds", sign, minutes, seconds) } - // For seconds, we display 4 significant digts. + // For seconds, we display 4 significant digits. return fmt.Sprintf("%s%.4gs", sign, v) } prefix := ""