Skip to content

Linter for field order in struct initialization #4919

Closed Answered by manuelarte
begelundmuller asked this question in Linter Ideas
Discussion options

You must be logged in to vote

Hi @begelundmuller,

I created a linter that does what you want here: https://github.com/manuelarte/structfieldinitorder

In the README.md you should find the instructions on how to run it. Let me know how it goes if you use it.

After some talks with the maintainers of golangci-lint, I don't think this linter will be included in it.

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@begelundmuller
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by ldez
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants