vss: Change ErrorHandler signature

We don't need `error` here: the only existing implementation
of `ErrorHandler` always call `Backup.Error` and all
implementations of `Backup.Error` always return nil.
This commit is contained in:
DRON-666
2020-11-10 06:48:05 +03:00
parent 9d3d915e2c
commit 88c509e3e9
3 changed files with 7 additions and 11 deletions

View File

@@ -88,10 +88,8 @@ func TestVSSConfig(t *testing.T) {
t.Fatal(err)
}
errorHandler := func(item string, err error) error {
errorHandler := func(item string, err error) {
t.Fatalf("unexpected error (%v)", err)
return nil
}
messageHandler := func(msg string, args ...interface{}) {
t.Fatalf("unexpected message (%s)", fmt.Sprintf(msg, args))
@@ -181,10 +179,8 @@ func TestParseMountPoints(t *testing.T) {
}
var log []string
errorHandler := func(item string, err error) error {
errorHandler := func(item string, err error) {
log = append(log, strings.TrimSpace(err.Error()))
return nil
}
messageHandler := func(msg string, args ...interface{}) {
t.Fatalf("unexpected message (%s)", fmt.Sprintf(msg, args))