mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-14 15:07:33 +08:00
object storage supports webdav
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
package storage
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
)
|
||||
|
||||
// bytesSliceObject represents a byte slice object in storage
|
||||
type bytesSliceObject struct {
|
||||
*bytes.Reader
|
||||
}
|
||||
|
||||
// Close does nothing because it does not hold any resources that need to be released
|
||||
func (b *bytesSliceObject) Close() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// newByteSliceObject creates a new byte slice object from the specified byte slice
|
||||
func newByteSliceObject(data []byte) ObjectInStorage {
|
||||
return &bytesSliceObject{
|
||||
Reader: bytes.NewReader(data),
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user