Linter that disallows Generics #3281
Unanswered
anders-swanson
asked this question in
Q&A
Replies: 1 comment 3 replies
-
Hello, A linter seems not the right approach, I think it's better to change your CI to use go1.17. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Some users of go 1.18+ may not want to use Generics in their code. Is it reasonable to add a linter that rejects code using Generics?
The use case for this is:
Project A has multiple release branches, which have different supported go versions. Trunk uses go 1.19, but the last major release uses go 1.17. In order to ensure new features may be backported from Trunk to the last major release, the developers agree not to use new language features (like Generics) for the time being.
Beta Was this translation helpful? Give feedback.
All reactions