ryankert01 opened a new pull request, #7827:
URL: https://github.com/apache/opendal/pull/7827

   # Which issue does this PR close?
   
   N/A
   
   # Rationale for this change
   
   The Go binding discarded the metadata returned by write operations, so 
callers
   could not read the written object's etag/version/last-modified without a 
second
   `Stat`. The Rust core and the Python binding already return `Metadata` from
   write; this brings the Go binding in line, additively.
   
   # What changes are included in this PR?
   
   - **C FFI:** add `opendal_operator_write_with_metadata` and
     `opendal_writer_close_with_metadata`, plus the `opendal_result_write` 
struct
     (mirrors `opendal_result_stat`); regenerate `opendal.h`. The existing
     `opendal_operator_write` / `opendal_writer_close` are left unchanged.
   - **Go:** add `Operator.WriteWithMetadata(...) (*Metadata, error)` and
     `Writer.CloseWithMetadata() (*Metadata, error)`. `Write` and `Writer.Close`
     keep their error-only signatures (still satisfy `io.WriteCloser`).
   - Unit tests (FFI signatures) and behavior tests.
   
   # Are there any user-facing changes?
   
   Yes, additive only. Two new methods are added; no existing signatures 
change, so
   existing callers keep compiling. The populated `Metadata` fields depend on 
the
   service (e.g. content length is always set; etag/version when supported).
   
   # AI Usage Statement
   
   Implemented and reviewed with Claude Code (Claude Opus 4.8).
   


-- 
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