Implement package-local tests
This commit is contained in:
parent
0a24261afb
commit
9a490f9e01
9 changed files with 818 additions and 18 deletions
|
@ -226,6 +226,10 @@ func (b *Local) GetReader(t backend.Type, name string, offset, length uint) (io.
|
|||
// Load returns the data stored in the backend for h at the given offset
|
||||
// and saves it in p. Load has the same semantics as io.ReaderAt.
|
||||
func (b *Local) Load(h backend.Handle, p []byte, off int64) (n int, err error) {
|
||||
if err := h.Valid(); err != nil {
|
||||
return 0, err
|
||||
}
|
||||
|
||||
f, err := os.Open(filename(b.p, h.Type, h.Name))
|
||||
if err != nil {
|
||||
return 0, err
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue