DocumentationNeedsFixhelp wanted
Repository metrics
- Stars
- (133,883 stars)
- PR merge metrics
- (No merged PRs in 30d)
Description
What is the URL of the page with the issue?
About "//export".
While the example code itself shows correct usage, the paragraph surrounding it doesn't say two things you should NOT do:
- Other "functional" comments in cgo allows beginning white spaces. Thus, for readability, one does (with a space between "//" and "#")
// #cgo pkg-config: ...
"//export" does not allow a space between. It is also extremely difficult to find out when the space should be deleted for this to work as intended. (A suitable warning if "// export ..." is used?)
- The other less important thing is trailing garbage/comments. Though a suitable error is emitted, it would be nice to be able to do have trailing comments like this:
//export MyRoutine // used by MyOtherProject
- It is also not clear whether the "//export MyRoutine" and the next line "func MyCoolRoutine ..." name must match. One might want to name routines by Go convention in Go code, but export as a different name following C code's naming conventions, for example?