use io.NopCloser replace closeWrapper (#20287)

This commit is contained in:
jiuker
2024-08-21 20:20:54 +08:00
committed by GitHub
parent 7b239ae154
commit 1e1bd3afd9
2 changed files with 1 additions and 15 deletions

View File

@@ -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 != "" {