Open jzabinski-dolios opened 2 years ago
I think this is a bug in the deadcode linter, not in TinyGo. It should recognize //export
and not treat those functions as unused.
I would be happy to submit the issue to the deadcode linter itself.
Is //export
syntax exclusive to the TinyGo compiler? Just want to be informed before I submit it to them. After a little digging, I don't find documentation for it outside tinygo.org.
When I write Go functions in a
main
package and add theexport
keyword, Go's deadcode linter warns that the code is unused. Normally this happens when the code is not otherwise used in the package. But exported functions are intentionally unused.It would be great to have a deadcode linter intended for TinyGo that makes an exception for
export
ed functions.