go version devel +812b34efae Mon Sep 4 00:07:33 2017 +0000 linux/amd64
Construct a comment map for:
package p
func f() {
return
}
// loose trailing comment
The loose trailing comment is associated in the CommentMap with the
return statement inside f. It should probably be associated with f
instead, and the NewCommentMap docs updated with new rules.
Live proof: https://play.golang.org/p/XCktcSxYl8
go version devel +812b34efae Mon Sep 4 00:07:33 2017 +0000 linux/amd64Construct a comment map for:
The loose trailing comment is associated in the CommentMap with the
return statement inside f. It should probably be associated with f
instead, and the NewCommentMap docs updated with new rules.
Live proof: https://play.golang.org/p/XCktcSxYl8