Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
go/ast: comment text changes newline type #35803
What version of Go are you using (
We also want tools such as gofmt to produce the same result independent of whether one runs on a Windows machine or not, which requires that newlines are always represented in one way, using LF.
I would expect this to work if you run the code on gofmt-ed code. Does it not?
Definitely agree here:
I understand the reasoning here.
Probably, I haven't tested it but I guess it will.
The cause is most likely git: it "helpfully" coverts newlines to CRLF. So while it is true that a simple
I would understand if you closed this as "working as intended" even though it caused some headaches for me.