b1ngsha opened a new pull request, #1185:
URL: https://github.com/apache/incubator-seata-go/pull/1185

   - [ ] I have registered the PR 
[changes](https://github.com/apache/incubator-seata-go/tree/master/changes).
   
   **What this PR does**:
   
   `go vet ./...` currently fails on master because the RocketMQ test helper 
`newTransactionMessageExt` builds a `primitive.MessageExt` with `Message: 
*msg`. `primitive.Message` embeds a `sync.RWMutex`, so this copies lock state 
(`copylocks`).
   
   This PR:
   
   1. Constructs `MessageExt` directly and sets Seata properties with 
`WithProperty`, instead of copying a `*primitive.Message`.
   2. Adds a dedicated `go vet ./...` GitHub Actions workflow, so vet failures 
are a visible check and are not buried in test or golangci-lint output.
   
   **Which issue(s) this PR fixes**:
   
   Fixes #1178
   
   **Special notes for your reviewer**:
   
   `CheckLocalTransaction` only reads `PropertySeataXID` and 
`PropertySeataBranchId` via `GetProperty`. The helper now creates a zero-value 
`MessageExt` (fresh mutex) and writes those fields through the RocketMQ client 
API, matching how `DecodeMessage` starts a `MessageExt`.
   
   No `//nolint`, no disabled `copylocks`, and no copy of another lock-bearing 
struct.
   
   A separate workflow is used instead of folding vet into `build.yml` / 
`unit-test.yml` (those jobs already run `-race` tests and would hide vet in 
test logs) or `golangci-lint.yml` (that job excludes `govet` on `_test.go`, and 
its Go / action versions are older).
   
   Verified locally:
   
   - `go vet ./...`
   - `go test -race ./pkg/integration/rocketmq/`
   
   **Does this PR introduce a user-facing change?**:
   
   No. Test helper and CI only.
   
   ```release-note
   NONE


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to