mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-12-13 22:27:29 -06:00
[chore] cleanup storage implementation, no need for multiple interface types (#1131)
Signed-off-by: kim <grufwub@gmail.com> Signed-off-by: kim <grufwub@gmail.com>
This commit is contained in:
parent
c9d893fec1
commit
fcb9c0bb8b
35 changed files with 129 additions and 178 deletions
|
|
@ -163,7 +163,7 @@ func (r *lengthReader) Read(b []byte) (int, error) {
|
|||
// putStream either puts a file with a known fileSize into storage directly, and returns the
|
||||
// fileSize unchanged, or it wraps the reader with a lengthReader and returns the discovered
|
||||
// fileSize.
|
||||
func putStream(ctx context.Context, storage storage.Driver, key string, r io.Reader, fileSize int64) (int64, error) {
|
||||
func putStream(ctx context.Context, storage *storage.Driver, key string, r io.Reader, fileSize int64) (int64, error) {
|
||||
if fileSize > 0 {
|
||||
return fileSize, storage.PutStream(ctx, key, r)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue