You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (go env)?
N/A
What did you do?
Tried to document an SQL parser.
What did you expect to see?
The comments I wrote. Specifically, for instance:
// but SQL uses doubled quotes, instead of backslashes, to escape things,
// so for instance, the string literal `'foo''bar'` denotes the string `foo'bar`.
What did you see instead?
Different comments which were wrong, specifically:
// but SQL uses doubled quotes, instead of backslashes, to escape things,
// so for instance, the string literal `'foo”bar'` denotes the string `foo'bar`.
That's not what I wrote, and it's not true.
What should be done
gofmt should absolutely, positively, under NO CIRCUMSTANCES WHATSOEVER replace meaningful and correct content in comments with completely incorrect content in comments. Smart quotes are NOT a correct replacement for apostrophes, least of all in documentation.
Honestly it should just absolutely never under any circumstances happen, but the fact that we're here at all means someone is deeply committed to it happening. But it should, very very much, absolutely be POSSIBLE TO SUPPRESS IT. For instance, by wrapping the quoted text in backticks to indicate that it's especially important that it be interpreted completely literally and not altered in any way.
gofmt is one of the best things about using Go because everyone can/does use it. that is contingent, in part, on it having a very light hand and not destroying things. Minor tweaks like adjusting spacing are pretty survivable. But if the result of using the tool is that my file is corrupted and my documentation is wrong, I'll stop using the tool, and if a lot of people stop using it, we lose one of the nicest things about the practical daily life of a person trying to work in Go.
The text was updated successfully, but these errors were encountered:
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (
go env
)?N/A
What did you do?
Tried to document an SQL parser.
What did you expect to see?
The comments I wrote. Specifically, for instance:
What did you see instead?
Different comments which were wrong, specifically:
That's not what I wrote, and it's not true.
What should be done
gofmt
should absolutely, positively, under NO CIRCUMSTANCES WHATSOEVER replace meaningful and correct content in comments with completely incorrect content in comments. Smart quotes are NOT a correct replacement for apostrophes, least of all in documentation.Honestly it should just absolutely never under any circumstances happen, but the fact that we're here at all means someone is deeply committed to it happening. But it should, very very much, absolutely be POSSIBLE TO SUPPRESS IT. For instance, by wrapping the quoted text in backticks to indicate that it's especially important that it be interpreted completely literally and not altered in any way.
gofmt
is one of the best things about using Go because everyone can/does use it. that is contingent, in part, on it having a very light hand and not destroying things. Minor tweaks like adjusting spacing are pretty survivable. But if the result of using the tool is that my file is corrupted and my documentation is wrong, I'll stop using the tool, and if a lot of people stop using it, we lose one of the nicest things about the practical daily life of a person trying to work in Go.The text was updated successfully, but these errors were encountered: