Code check (#2558)

* vmstorage: make gofmt happy

Signed-off-by: hagen1778 <roman@victoriametrics.com>

* vmalert: make linter happy

Signed-off-by: hagen1778 <roman@victoriametrics.com>
This commit is contained in:
Roman Khavronenko 2022-05-09 08:11:56 +00:00 committed by GitHub
parent e9fa363480
commit 331a5d9a17
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View File

@ -170,7 +170,7 @@ func newManager(ctx context.Context) (*manager, error) {
return nil, fmt.Errorf("failed to init datasource: %w", err) return nil, fmt.Errorf("failed to init datasource: %w", err)
} }
labels := make(map[string]string, 0) labels := make(map[string]string)
for _, s := range *externalLabels { for _, s := range *externalLabels {
if len(s) == 0 { if len(s) == 0 {
continue continue

View File

@ -11,7 +11,7 @@ import (
) )
func TestAlert_ExecTemplate(t *testing.T) { func TestAlert_ExecTemplate(t *testing.T) {
extLabels := make(map[string]string, 0) extLabels := make(map[string]string)
const ( const (
extCluster = "prod" extCluster = "prod"
extDC = "east" extDC = "east"

View File

@ -95,7 +95,7 @@ func InitWithoutMetrics(resetCacheIfNeeded func(mrs []storage.MetricRow)) {
mergeset.SetIndexBlocksCacheSize(cacheSizeIndexDBIndexBlocks.N) mergeset.SetIndexBlocksCacheSize(cacheSizeIndexDBIndexBlocks.N)
mergeset.SetDataBlocksCacheSize(cacheSizeIndexDBDataBlocks.N) mergeset.SetDataBlocksCacheSize(cacheSizeIndexDBDataBlocks.N)
if retentionPeriod.Msecs < 24 * 3600 * 1000 { if retentionPeriod.Msecs < 24*3600*1000 {
logger.Fatalf("-retentionPeriod cannot be smaller than a day; got %s", retentionPeriod) logger.Fatalf("-retentionPeriod cannot be smaller than a day; got %s", retentionPeriod)
} }
logger.Infof("opening storage at %q with -retentionPeriod=%s", *DataPath, retentionPeriod) logger.Infof("opening storage at %q with -retentionPeriod=%s", *DataPath, retentionPeriod)