zeroshade commented on code in PR #1047:
URL: https://github.com/apache/arrow-go/pull/1047#discussion_r3722323875


##########
arrow/ipc/writer.go:
##########
@@ -136,6 +148,16 @@ func NewWriter(w io.Writer, opts ...Option) *Writer {
 }
 
 func (w *Writer) Close() error {
+       if w.err != nil {
+               if w.started && w.pw != nil {
+                       if err := w.pw.Close(); err != nil {
+                               w.err = errors.Join(w.err, err)
+                       }

Review Comment:
   ```suggestion                        
                        w.err = errors.Join(w.err, err)                 
   ```
   
   You don't need to do the `err != nil` check here, `errors.Join` already does 
it



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