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.
cmd/gofmt: Unexpected formatting with one line functions/methods. #19544
What version of Go are you using (
Seems to be caused by
If the vtab is replaced with blank, all is well. But was there a reason?
The vtab controls the column layout. We want one here because if we have multiple one-line functions w/o empty lines between them, we want the function bodies to align (at least that's what they are doing now).
The assumption was that there would be an empty line before and after any multi-line function, and then the issue you're seeing doesn't occur. (That's also the work-around in this case).