-
Notifications
You must be signed in to change notification settings - Fork 583
[objects] How do I use ExtractContent with Download? #2548
Copy link
Copy link
Closed
Description
The documentation for objects.Download states:
Download is a function that retrieves the content and metadata for an object. To extract just the content, pass the DownloadResult response to the ExtractContent function.
The wording, although a bit confusing (ExtractContent is a method, non a function), seems to suggest that something like this is possible:
b, err := objects.Download(client, "container", "object", nil).ExtractContent()
if err != nil {
panic(err)
}
fmt.Printf("---\n%s\n---\n", b)However, this doesn't work because the result of Download is a bare DownloadResult value, while ExtractContent is a method with a pointer receiver.
What is the recommended way to use ExtractContent?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels