Skip to content

Commit

Permalink
CR: use val, ok syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
disq committed Oct 2, 2024
1 parent a22c9bd commit 512d6c0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions writers/streamingbatchwriter/streamingbatchwriter.go
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,8 @@ func (w *StreamingBatchWriter) Write(ctx context.Context, msgs <-chan message.Wr

for {
select {
case msg := <-msgs:
if msg == nil {
case msg, ok := <-msgs:
if !ok {
return w.Close(ctx)
}

Expand Down

0 comments on commit 512d6c0

Please sign in to comment.