mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2026-05-17 00:26:36 +03:00
all: consistently start error fmt.Errorf() messages with small letter
This commit is contained in:
@@ -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())
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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("://"):]
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user