cmd/cgo: CGo Exported Function has an empty line between it and its documentation block #37722
Labels
Documentation
Issues describing a change to documentation.
FrozenDueToAge
help wanted
NeedsFix
The path to resolution is known, but the work has not been done.
Milestone
I'm writing a library in Go that I'm compiling to a native library using CGo, however when the functions are exported they have this annoying empty line between the function declaration and the documentation comment.
As an example, let's say I have this in my go file
Once it's exported in my C header file, it looks like this
That empty line for the most part isn't a problem, but on some IDEs when parsing that header file they have difficulty properly displaying the intellisense, making consumption of the header slightly more difficult. Especially when you factor in the way that cgo renames function parameters
I've found what i believe is the area in the go source code that causes this:
https://github.com/golang/go/blob/master/src/cmd/cgo/out.go#L922
I feel like perhaps that
\n
before theextern
keyword shouldn't be there. Unless this is intentional?The text was updated successfully, but these errors were encountered: