mirror of
https://github.com/minio/minio.git
synced 2025-11-07 12:52:58 -05:00
use io.NopCloser replace closeWrapper (#20287)
This commit is contained in:
@@ -2079,14 +2079,6 @@ func (s *xlStorage) ReadFileStream(ctx context.Context, volume, path string, off
|
||||
return &sendFileReader{Reader: io.LimitReader(file, length), Closer: file}, nil
|
||||
}
|
||||
|
||||
// closeWrapper converts a function to an io.Closer
|
||||
type closeWrapper func() error
|
||||
|
||||
// Close calls the wrapped function.
|
||||
func (c closeWrapper) Close() error {
|
||||
return c()
|
||||
}
|
||||
|
||||
// CreateFile - creates the file.
|
||||
func (s *xlStorage) CreateFile(ctx context.Context, origvolume, volume, path string, fileSize int64, r io.Reader) (err error) {
|
||||
if origvolume != "" {
|
||||
|
||||
Reference in New Issue
Block a user