-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build tags ignored in test files #113
Comments
I suspect that this is because you're passing an unfiltered Line 77 in 8b1606a
One solution I could imagine would be to pass the Line 69 in 8b1606a
Or, maybe define another unexported function like Lines 278 to 282 in 8b1606a
I built a pretty hackneyed solution to it that gets me unstuck in the project where I ran into this. But its not elegant at all. I'd be happy to open a PR if you're interested, let me know if one of these options ☝️ sounds good or if you see another possible approach. |
This is very useful feature, hopes to get merged soon. |
I am seeing that when an example function is defined in a
_test.go
file has some build tag constraint, those constraints don't seem to be respected by gomarkdoc.I put together a little repo to demonstrate this. One
func Example()
is defined in a file that should only be selected when the build tagexample
is on, anotherfunc Example()
is in a file that should only be selected when the build tag is off. But both examples show up when I rungomarkdoc
, regardless of whether I specify any build tags inGOFLAGS
or--tags
.The text was updated successfully, but these errors were encountered: