mirror of
https://github.com/restic/restic.git
synced 2025-12-23 01:56:16 +00:00
backend: move LimitReadCloser to util package
The helper is only intended for usage by backend implementations.
This commit is contained in:
3
internal/cache/file.go
vendored
3
internal/cache/file.go
vendored
@@ -8,6 +8,7 @@ import (
|
||||
|
||||
"github.com/pkg/errors"
|
||||
"github.com/restic/restic/internal/backend"
|
||||
"github.com/restic/restic/internal/backend/util"
|
||||
"github.com/restic/restic/internal/crypto"
|
||||
"github.com/restic/restic/internal/debug"
|
||||
"github.com/restic/restic/internal/fs"
|
||||
@@ -74,7 +75,7 @@ func (c *Cache) load(h backend.Handle, length int, offset int64) (io.ReadCloser,
|
||||
if length <= 0 {
|
||||
return f, nil
|
||||
}
|
||||
return backend.LimitReadCloser(f, int64(length)), nil
|
||||
return util.LimitReadCloser(f, int64(length)), nil
|
||||
}
|
||||
|
||||
// Save saves a file in the cache.
|
||||
|
||||
Reference in New Issue
Block a user