Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update download.go #2941

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .changelog/5028b91c-7174-4v65-9adf-c787e66cd12c.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"id": "5028b91c-7174-4v65-9adf-c787e66cd12c",
"type": "bugfix",
"collapse": true,
"description": "replaced '3manager' with 'manager' in the `manager` package (v2).",
"modules": [
"feature/s3/manager"
]
}
2 changes: 1 addition & 1 deletion feature/s3/manager/download.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ func NewDownloader(c DownloadAPIClient, options ...func(*Downloader)) *Downloade
// // pre-allocate in memory buffer, where headObject type is *s3.HeadObjectOutput
// buf := make([]byte, int(headObject.ContentLength))
// // wrap with aws.WriteAtBuffer
// w := s3manager.NewWriteAtBuffer(buf)
// w := manager.NewWriteAtBuffer(buf)
// // download file into the memory
// numBytesDownloaded, err := downloader.Download(ctx, w, &s3.GetObjectInput{
// Bucket: aws.String(bucket),
Expand Down
4 changes: 2 additions & 2 deletions feature/s3/manager/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
// requires payload signing.
//
// Note: If using with S3 PutObject to stream an object upload. The SDK's S3
// Upload Manager(s3manager.Uploader) provides support for streaming
// Upload Manager(manager.Uploader) provides support for streaming
// with the ability to retry network errors.
func ReadSeekCloser(r io.Reader) *ReaderSeekerCloser {
return &ReaderSeekerCloser{r}
Expand Down Expand Up @@ -137,7 +137,7 @@ func (r *ReaderSeekerCloser) Close() error {
}

// A WriteAtBuffer provides a in memory buffer supporting the io.WriterAt interface
// Can be used with the s3manager.Downloader to download content to a buffer
// Can be used with the manager.Downloader to download content to a buffer
// in memory. Safe to use concurrently.
type WriteAtBuffer struct {
buf []byte
Expand Down