backend: Remove Get()

This is the first commit that removes the (redundant) Get() method of
the backend interface. Get(x, y) is equivalent to GetReader(x, y, 0, 0).
This commit is contained in:
Alexander Neumann committed 2016-01-23 13:13:05 +01:00
1 parent d3a6e2a991
commit 8b7bf8691d
12 files changed
+12 -105

No files matched your search

-9
View File
@@ -10,7 +10,6 @@ import (
type MockBackend struct {
CloseFn func() error
CreateFn func() (Blob, error)
GetFn func(Type, string) (io.ReadCloser, error)
GetReaderFn func(Type, string, uint, uint) (io.ReadCloser, error)
ListFn func(Type, <-chan struct{}) <-chan string
RemoveFn func(Type, string) error
@@ -43,14 +42,6 @@ func (m *MockBackend) Create() (Blob, error) {
return m.CreateFn()
}
func (m *MockBackend) Get(t Type, name string) (io.ReadCloser, error) {
if m.GetFn == nil {
return nil, errors.New("not implemented")
}
return m.GetFn(t, name)
}
func (m *MockBackend) GetReader(t Type, name string, offset, len uint) (io.ReadCloser, error) {
if m.GetReaderFn == nil {
return nil, errors.New("not implemented")