zeroshade commented on a change in pull request #10142:
URL: https://github.com/apache/arrow/pull/10142#discussion_r619889834



##########
File path: go/arrow/flight/flight_test.go
##########
@@ -311,3 +312,65 @@ func TestServer(t *testing.T) {
                t.Fatalf("got %d, want %d", numRows, fi.TotalRecords)
        }
 }
+
+type flightMetadataWriterServer struct{}
+
+func (f *flightMetadataWriterServer) DoGet(tkt *flight.Ticket, fs 
flight.FlightService_DoGetServer) error {
+       recs := arrdata.Records[string(tkt.GetTicket())]
+
+       w := flight.NewRecordWriter(fs, ipc.WithSchema(recs[0].Schema()))
+       defer w.Close()
+       for idx, r := range recs {
+               w.WriteWithAppMetadata(r, []byte(fmt.Sprintf("%d_%s", idx, 
string(tkt.GetTicket()))))

Review comment:
       So when running `gofmt` after adding the `/*metadata*/` before 
`[]byte(fmt.Sprintf("%d_%s", idx, string(tkt.GetTicket())))` it insisted on the 
comment being put after the `r` before the comma, so it appears that the 
convention for Go is for the comment identifying the literal to be *after* the 
value, rather than before it. So that's what i'll do.




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

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


Reply via email to