mirror of
https://github.com/restic/restic.git
synced 2026-05-14 14:25:23 +00:00
fix linter and compilation issues
This commit is contained in:
@@ -456,8 +456,8 @@ func (s *sizeHistogram) Add(size uint64) {
|
||||
func (s sizeHistogram) String() string {
|
||||
var out strings.Builder
|
||||
|
||||
out.WriteString(fmt.Sprintf("Count: %d\n", s.count))
|
||||
out.WriteString(fmt.Sprintf("Total Size: %s\n", ui.FormatBytes(s.totalSize)))
|
||||
fmt.Fprintf(&out, "Count: %d\n", s.count)
|
||||
fmt.Fprintf(&out, "Total Size: %s\n", ui.FormatBytes(s.totalSize))
|
||||
|
||||
t := table.New()
|
||||
t.AddColumn("Size", "{{.SizeRange}}")
|
||||
@@ -506,7 +506,7 @@ func (s sizeHistogram) String() string {
|
||||
_ = t.Write(&out)
|
||||
|
||||
if len(s.oversized) > 0 {
|
||||
out.WriteString(fmt.Sprintf("Oversized: %v\n", s.oversized))
|
||||
fmt.Fprintf(&out, "Oversized: %v\n", s.oversized)
|
||||
}
|
||||
return out.String()
|
||||
}
|
||||
|
||||
@@ -108,7 +108,7 @@ func TestVSSConfig(t *testing.T) {
|
||||
t.Fatalf("unexpected error (%v)", err)
|
||||
}
|
||||
messageHandler := func(msg string, args ...interface{}) {
|
||||
t.Fatalf("unexpected message (%s)", fmt.Sprintf(msg, args))
|
||||
t.Fatalf("unexpected message (%s)", fmt.Sprintf(msg, args...))
|
||||
}
|
||||
|
||||
dst := NewLocalVss(errorHandler, messageHandler, cfg)
|
||||
@@ -202,7 +202,7 @@ func TestParseMountPoints(t *testing.T) {
|
||||
log = append(log, strings.TrimSpace(err.Error()))
|
||||
}
|
||||
messageHandler := func(msg string, args ...interface{}) {
|
||||
t.Fatalf("unexpected message (%s)", fmt.Sprintf(msg, args))
|
||||
t.Fatalf("unexpected message (%s)", fmt.Sprintf(msg, args...))
|
||||
}
|
||||
|
||||
dst := NewLocalVss(errorHandler, messageHandler, cfg)
|
||||
@@ -304,7 +304,7 @@ func TestVSSFS(t *testing.T) {
|
||||
if strings.HasPrefix(msg, "creating VSS snapshot for") || strings.HasPrefix(msg, "successfully created snapshot") {
|
||||
return
|
||||
}
|
||||
t.Fatalf("unexpected message (%s)", fmt.Sprintf(msg, args))
|
||||
t.Fatalf("unexpected message (%s)", fmt.Sprintf(msg, args...))
|
||||
}
|
||||
|
||||
localVss := NewLocalVss(errorHandler, messageHandler, cfg)
|
||||
|
||||
Reference in New Issue
Block a user