Can this work outside `main` package?
Closed this issue · 2 comments
russoj88 commented
@steverusso I started making a Go Example test here, but goclap doesn't seem to generate the right code if it's outside the main package.
Is this something it could support? I think having testable example would be beneficial for the project!
steverusso commented
This raises two good points:
- goclap as it stands will panic when used on any package other than
main
since I naively hardcoded the package name. - I think tests would be beneficial, and testable examples probably can't hurt. I'll investigate that branch a little further and start making whichever few adjustments are necessary here.
steverusso commented
With 4c3916f, it won't panic for a package other than main
✔️