diff --git a/app/vmctl/opentsdb.go b/app/vmctl/opentsdb.go index 6ac4a60503..24161b2215 100644 --- a/app/vmctl/opentsdb.go +++ b/app/vmctl/opentsdb.go @@ -132,7 +132,7 @@ func (op *otsdbProcessor) run() error { close(errCh) // check for any lingering errors on the query side for otsdbErr := range errCh { - return fmt.Errorf("Import process failed: \n%s", otsdbErr) + return fmt.Errorf("import process failed: \n%s", otsdbErr) } bar.Finish() log.Print(op.im.Stats()) diff --git a/app/vmctl/opentsdb/opentsdb.go b/app/vmctl/opentsdb/opentsdb.go index 11e5caeb59..22f0ab8306 100644 --- a/app/vmctl/opentsdb/opentsdb.go +++ b/app/vmctl/opentsdb/opentsdb.go @@ -109,7 +109,7 @@ func (c Client) FindMetrics(q string) ([]string, error) { return nil, fmt.Errorf("failed to send GET request to %q: %s", q, err) } if resp.StatusCode != 200 { - return nil, fmt.Errorf("Bad return from OpenTSDB: %q: %v", resp.StatusCode, resp) + return nil, fmt.Errorf("bad return from OpenTSDB: %q: %v", resp.StatusCode, resp) } defer func() { _ = resp.Body.Close() }() body, err := io.ReadAll(resp.Body) @@ -133,7 +133,7 @@ func (c Client) FindSeries(metric string) ([]Meta, error) { return nil, fmt.Errorf("failed to set GET request to %q: %s", q, err) } if resp.StatusCode != 200 { - return nil, fmt.Errorf("Bad return from OpenTSDB: %q: %v", resp.StatusCode, resp) + return nil, fmt.Errorf("bad return from OpenTSDB: %q: %v", resp.StatusCode, resp) } defer func() { _ = resp.Body.Close() }() body, err := io.ReadAll(resp.Body) @@ -310,7 +310,7 @@ func NewClient(cfg Config) (*Client, error) { for _, r := range cfg.Retentions { ret, err := convertRetention(r, offsetSecs, cfg.MsecsTime) if err != nil { - return &Client{}, fmt.Errorf("Couldn't parse retention %q :: %v", r, err) + return &Client{}, fmt.Errorf("couldn't parse retention %q :: %v", r, err) } retentions = append(retentions, ret) } diff --git a/app/vmselect/graphite/transform.go b/app/vmselect/graphite/transform.go index d909b503a3..64a5487f08 100644 --- a/app/vmselect/graphite/transform.go +++ b/app/vmselect/graphite/transform.go @@ -1380,7 +1380,7 @@ func aggregateSeriesList(ec *evalConfig, fe *graphiteql.FuncExpr, nextSeriesFirs } if len(ssFirst) != len(ssSecond) { - return nil, fmt.Errorf("First and second lists must have equal number of series; got %d vs %d series", len(ssFirst), len(ssSecond)) + return nil, fmt.Errorf("first and second lists must have equal number of series; got %d vs %d series", len(ssFirst), len(ssSecond)) } if stepFirst != stepSecond { return nil, fmt.Errorf("step mismatch for first and second: %d vs %d", stepFirst, stepSecond) diff --git a/lib/backup/actions/util.go b/lib/backup/actions/util.go index 6c71d2a3ff..9136d5ea52 100644 --- a/lib/backup/actions/util.go +++ b/lib/backup/actions/util.go @@ -199,7 +199,7 @@ func NewRemoteFS(ctx context.Context, path string) (common.RemoteFS, error) { } n := strings.Index(path, "://") if n < 0 { - return nil, fmt.Errorf("Missing scheme in path %q. Supported schemes: `gs://`, `s3://`, `azblob://`, `fs://`", path) + return nil, fmt.Errorf("missing scheme in path %q. Supported schemes: `gs://`, `s3://`, `azblob://`, `fs://`", path) } scheme := path[:n] dir := path[n+len("://"):] diff --git a/lib/protoparser/graphite/stream/streamparser.go b/lib/protoparser/graphite/stream/streamparser.go index aefd000c6b..fcd23a30df 100644 --- a/lib/protoparser/graphite/stream/streamparser.go +++ b/lib/protoparser/graphite/stream/streamparser.go @@ -29,7 +29,7 @@ var ( func Parse(r io.Reader, encoding string, callback func(rows []graphite.Row) error) error { reader, err := protoparserutil.GetUncompressedReader(r, encoding) if err != nil { - return fmt.Errorf("Cannot decode graphite data: %w", err) + return fmt.Errorf("cannot decode graphite data: %w", err) } defer protoparserutil.PutUncompressedReader(reader) diff --git a/lib/snapshot/snapshot.go b/lib/snapshot/snapshot.go index ff00b1b2c0..75533f5315 100644 --- a/lib/snapshot/snapshot.go +++ b/lib/snapshot/snapshot.go @@ -73,7 +73,7 @@ func Create(ctx context.Context, createSnapshotURL string) (string, error) { if snap.Status == "error" { return "", errors.New(snap.Msg) } - return "", fmt.Errorf("Unknown status: %v", snap.Status) + return "", fmt.Errorf("unknown status: %v", snap.Status) } // Delete deletes a snapshot via the provided api endpoint @@ -121,7 +121,7 @@ func Delete(ctx context.Context, deleteSnapshotURL string, snapshotName string) if snap.Status == "error" { return errors.New(snap.Msg) } - return fmt.Errorf("Unknown status: %v", snap.Status) + return fmt.Errorf("unknown status: %v", snap.Status) } // GetHTTPClient returns a new HTTP client configured for snapshot operations.