dentiny commented on code in PR #7827:
URL: https://github.com/apache/opendal/pull/7827#discussion_r3494274156


##########
bindings/go/writer.go:
##########
@@ -71,6 +71,36 @@ func (op *Operator) Write(path string, data []byte, opts 
...WithWriteFn) error {
        return err
 }
 
+// WriteWithMetadata writes data to the given path like Write, but additionally
+// returns the metadata of the written object (such as etag, version, or last
+// modified) as reported by the underlying service.
+//
+// WriteWithMetadata is a wrapper around the C-binding function
+// `opendal_operator_write_with_metadata`. Which fields of the returned 
Metadata
+// are populated depends on the service.
+func (op *Operator) WriteWithMetadata(path string, data []byte, opts 
...WithWriteFn) (*Metadata, error) {

Review Comment:
   Hi @yuchanns I'm wondering if you think it better to add a new API, or we 
could break current `Write` API and return metadata? 
   
   I kinda prefer to update the return value for `Write` API:
   - Current go binding is not finalized -- we need at least context as the 
first argument for all APIs
   - One single interface is (1) more clear; (2) stick to rust API



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to