mirror of
https://github.com/restic/restic.git
synced 2025-12-14 02:57:04 +00:00
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:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user