fix linter and compilation issues

This commit is contained in:
Michael Eischer
2026-05-10 17:50:49 +02:00
parent a241652787
commit 4c94678d7d
2 changed files with 6 additions and 6 deletions
+3 -3
View File
@@ -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()
}
+3 -3
View File
@@ -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)