Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
See http://play.golang.org/p/jFoDNNrB9y
I would expect a file that starts with
/*a*/package main
to have an ast.File.Doc comment of "a", but it has "".
Adding a newline before 'package' causes the File.Doc comment to become "a\n", as it should.
The text was updated successfully, but these errors were encountered:
The comment is not lost as http://play.golang.org/p/Zl0pDK6KIV (click on Format) proves.
This is working as intended. The doc string comes from comments on the immediately preceding lines of a declaration. I don't see any reason to make this any more complicated. It also has worked for several years now w/o anybody complaining.
Sorry, something went wrong.
Fair enough. My mindset was warped by another (real) bug that I was in the middle of debugging when I found this.
No branches or pull requests
See http://play.golang.org/p/jFoDNNrB9y
I would expect a file that starts with
to have an ast.File.Doc comment of "a", but it has "".
Adding a newline before 'package' causes the File.Doc comment to become "a\n", as it should.
The text was updated successfully, but these errors were encountered: