Skip to content

Commit

Permalink
fix panic in span reporting
Browse files Browse the repository at this point in the history
  • Loading branch information
qrort committed Jan 7, 2025
1 parent 4068af9 commit 49e060a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions internal/xsql/legacy/tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ type transaction struct {
}

func (tx *transaction) ID() string {
if tx.tx == nil {
return ""
}
return tx.tx.ID()

Check failure on line 26 in internal/xsql/legacy/tx.go

View workflow job for this annotation

GitHub Actions / golangci-lint

return with no blank line before (nlreturn)
}

Expand Down
3 changes: 3 additions & 0 deletions internal/xsql/tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ type Tx struct {
}

func (tx *Tx) ID() string {
if tx.tx == nil {
return ""
}
return tx.tx.ID()

Check failure on line 24 in internal/xsql/tx.go

View workflow job for this annotation

GitHub Actions / golangci-lint

return with no blank line before (nlreturn)
}

Expand Down

0 comments on commit 49e060a

Please sign in to comment.