4 ms·
Mhm, probably worth a golang-ci check for duplicate field names which are accessed by methods on the embedded type.
by 0x696C6961 2mo ago
Mhm, probably worth a golang-ci check for duplicate field names which are accessed by methods on the embedded type.
- pjmlp 2mo agoBetter would be a got vet check. I understand the need not to break existing code that might have such fields.
- 0x696C6961 2mo agoI think that's a no-go because vet checks have no-false-positive policy. Ie, when go vet flags something, its a bug.
- pjmlp 2mo agoI would say that initialising the wrong field because a dev is unaware of a clash between Gopher.Burrow and Gopher.Habitat.Burrow (naturally in more complex code), when upgrading to 1.27 and taking advantage of the feature without realising it, is a bug.
- 0x696C6961 2mo agoWell either way, these things usually land in golangci-lint first and get promoted if they're deemed useful enough.