The situation
I am writing go language applications on Windows 10. I use vim to edit my source files. I use git for version control.
The go language comes with some unusually rigid prescriptions for source file formatting. I have decided my life will be easier if I go along with this.
The problem
the go fmt
command is useful for sorting imports, lining up columns and other things. I'm inclined to use it prior to checkin and at other times.
The go fmt
command changes line endings to lf
. This causes both git
and vim
to issue warnings.
My solution?
Moved into an "Answer" after 3 months because no other answers appeared and it's probably better for other people with a similar problem to see in a search result that this question has 1 Answer rather than 0 Answers
My question.
Is my line-ending solution optimal or have I missed something that may bite me later?