mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-21 14:44:00 +00:00
all: fix golangci-lint
issues
This commit is contained in:
parent
8a2ea0171a
commit
7545784a49
3 changed files with 4 additions and 5 deletions
|
@ -1,8 +1,6 @@
|
||||||
package fsnil
|
package fsnil
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
|
||||||
|
|
||||||
"github.com/VictoriaMetrics/VictoriaMetrics/lib/backup/common"
|
"github.com/VictoriaMetrics/VictoriaMetrics/lib/backup/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -11,7 +9,7 @@ type FS struct{}
|
||||||
|
|
||||||
// String returns human-readable string representation for fs.
|
// String returns human-readable string representation for fs.
|
||||||
func (fs *FS) String() string {
|
func (fs *FS) String() string {
|
||||||
return fmt.Sprintf("fsnil")
|
return "fsnil"
|
||||||
}
|
}
|
||||||
|
|
||||||
// ListParts returns all the parts from fs.
|
// ListParts returns all the parts from fs.
|
||||||
|
|
|
@ -155,7 +155,7 @@ func TestFastQueueReadUnblockByWrite(t *testing.T) {
|
||||||
mustDeleteDir(path)
|
mustDeleteDir(path)
|
||||||
|
|
||||||
fq := MustOpenFastQueue(path, "foobar", 13, 0)
|
fq := MustOpenFastQueue(path, "foobar", 13, 0)
|
||||||
block := fmt.Sprintf("foodsafdsaf sdf")
|
block := "foodsafdsaf sdf"
|
||||||
resultCh := make(chan error)
|
resultCh := make(chan error)
|
||||||
go func() {
|
go func() {
|
||||||
data, ok := fq.MustReadBlock(nil)
|
data, ok := fq.MustReadBlock(nil)
|
||||||
|
|
|
@ -187,8 +187,9 @@ func (sc *ScrapeConfig) appendFileSDScrapeWork(dst, prev []ScrapeWork, baseDir s
|
||||||
label := promrelabel.GetLabelByName(sw.Labels, "__meta_filepath")
|
label := promrelabel.GetLabelByName(sw.Labels, "__meta_filepath")
|
||||||
if label == nil {
|
if label == nil {
|
||||||
logger.Panicf("BUG: missing `__meta_filepath` label")
|
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 {
|
for i := range sc.FileSDConfigs {
|
||||||
var err error
|
var err error
|
||||||
|
|
Loading…
Reference in a new issue