mirror of
https://github.com/restic/restic.git
synced 2026-11-28 23:27:49 +00:00
Remove Create() everywhere
This commit is contained in:
1 parent
ea29ad6f96
commit
1547d3b656
13 files changed
+25
-401
No files matched your search
@@ -6,7 +6,6 @@ import "errors"
|
||||
// should only be used for tests.
|
||||
type MockBackend struct {
|
||||
CloseFn func() error
|
||||
CreateFn func() (Blob, error)
|
||||
LoadFn func(h Handle, p []byte, off int64) (int, error)
|
||||
SaveFn func(h Handle, p []byte) error
|
||||
StatFn func(h Handle) (BlobInfo, error)
|
||||
@@ -33,14 +32,6 @@ func (m *MockBackend) Location() string {
|
||||
return m.LocationFn()
|
||||
}
|
||||
|
||||
func (m *MockBackend) Create() (Blob, error) {
|
||||
if m.CreateFn == nil {
|
||||
return nil, errors.New("not implemented")
|
||||
}
|
||||
|
||||
return m.CreateFn()
|
||||
}
|
||||
|
||||
func (m *MockBackend) Load(h Handle, p []byte, off int64) (int, error) {
|
||||
if m.LoadFn == nil {
|
||||
return 0, errors.New("not implemented")
|
||||
|
||||
Reference in new issue
Block a user