Suspicious assignment to a by-value method receiver (RowReceiverArr.BindAddress)
Open
component/dumpling
- Dominant language
- Go
- Stars
- 40.5k
- Forks
- 6.2k
- PR merge metrics
- PR metrics pending
Description
https://github.com/pingcap/tidb/blob/a3bafcdffb1008d224fe06af717e231c82b8f6b1/dumpling/export/sql_type.go#L200-L208
The assignment `r.bound = true` (line 204) has no effect out of the method body,
The receiver must be by-reference to keep the assigned value beyond the method call.
Either make the receiver by-reference or remove lines 201-204
(found by [revive](https://github.com/mgechev/revive) while testing it on tidb code base)
Contributor guide
Assessment
This issue has not been assessed yet.