Skip to content

Commit

Permalink
fix errors.As usage
Browse files Browse the repository at this point in the history
double pointers!
  • Loading branch information
twmb committed May 7, 2021
1 parent c01e69d commit bc6cc8a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/kgo/txn.go
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@ func (cl *Client) EndTransaction(ctx context.Context, commit TransactionEndTry)

// If the returned error is still a Kafka error, this is fatal and we
// need to fail our producer ID we loaded above.
var ke kerr.Error
var ke *kerr.Error
if err != nil && errors.As(err, &ke) && !ke.Retriable {
cl.failProducerID(id, epoch, err)
}
Expand Down Expand Up @@ -612,7 +612,7 @@ func (cl *Client) addOffsetsToTxn(ctx context.Context, group string) error {

// If the returned error is still a Kafka error, this is fatal and we
// need to fail our producer ID we created just above.
var ke kerr.Error
var ke *kerr.Error
if err != nil && errors.As(err, &ke) && !ke.Retriable {
cl.failProducerID(id, epoch, err)
}
Expand Down

0 comments on commit bc6cc8a

Please sign in to comment.