all: fix golangci-lint issues

This commit is contained in:
Aliaksandr Valialkin 2020-03-10 19:39:55 +02:00
parent 8a2ea0171a
commit 7545784a49
3 changed files with 4 additions and 5 deletions

View file

@ -1,8 +1,6 @@
package fsnil
import (
"fmt"
"github.com/VictoriaMetrics/VictoriaMetrics/lib/backup/common"
)
@ -11,7 +9,7 @@ type FS struct{}
// String returns human-readable string representation for fs.
func (fs *FS) String() string {
return fmt.Sprintf("fsnil")
return "fsnil"
}
// ListParts returns all the parts from fs.

View file

@ -155,7 +155,7 @@ func TestFastQueueReadUnblockByWrite(t *testing.T) {
mustDeleteDir(path)
fq := MustOpenFastQueue(path, "foobar", 13, 0)
block := fmt.Sprintf("foodsafdsaf sdf")
block := "foodsafdsaf sdf"
resultCh := make(chan error)
go func() {
data, ok := fq.MustReadBlock(nil)

View file

@ -187,8 +187,9 @@ func (sc *ScrapeConfig) appendFileSDScrapeWork(dst, prev []ScrapeWork, baseDir s
label := promrelabel.GetLabelByName(sw.Labels, "__meta_filepath")
if label == nil {
logger.Panicf("BUG: missing `__meta_filepath` label")
} else {
swPrev[label.Value] = append(swPrev[label.Value], *sw)
}
swPrev[label.Value] = append(swPrev[label.Value], *sw)
}
for i := range sc.FileSDConfigs {
var err error