mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-09-20 01:49:23 +08:00
fix atomic add int64
fix https://github.com/chrislusf/seaweedfs/issues/3038#issuecomment-1123269831
This commit is contained in:
@@ -58,10 +58,10 @@ func downloadFromS3(sess s3iface.S3API, destFileName string, sourceBucket string
|
|||||||
// adapted from https://github.com/aws/aws-sdk-go/pull/1868
|
// adapted from https://github.com/aws/aws-sdk-go/pull/1868
|
||||||
// and https://petersouter.xyz/s3-download-progress-bar-in-golang/
|
// and https://petersouter.xyz/s3-download-progress-bar-in-golang/
|
||||||
type s3DownloadProgressedWriter struct {
|
type s3DownloadProgressedWriter struct {
|
||||||
fp *os.File
|
|
||||||
size int64
|
size int64
|
||||||
written int64
|
written int64
|
||||||
fn func(progressed int64, percentage float32) error
|
fn func(progressed int64, percentage float32) error
|
||||||
|
fp *os.File
|
||||||
}
|
}
|
||||||
|
|
||||||
func (w *s3DownloadProgressedWriter) WriteAt(p []byte, off int64) (int, error) {
|
func (w *s3DownloadProgressedWriter) WriteAt(p []byte, off int64) (int, error) {
|
||||||
|
Reference in New Issue
Block a user