gomarkdoc icon indicating copy to clipboard operation
gomarkdoc copied to clipboard

Build tags ignored in test files

Open rclark opened this issue 7 months ago • 2 comments

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 tag example is on, another func Example() is in a file that should only be selected when the build tag is off. But both examples show up when I run gomarkdoc, regardless of whether I specify any build tags in GOFLAGS or --tags.

Screenshot 2024-07-06 at 1 03 36 PM

rclark avatar Jul 06 '24 20:07 rclark