-
Notifications
You must be signed in to change notification settings - Fork 74
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
Add exclude-private option #22
base: master
Are you sure you want to change the base?
Conversation
Instead of checking |
continue | ||
} | ||
// Repeat each test - once with all symbols and once without private symbols | ||
for _, excludePrivate := range []bool{false, true} { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could also just add an extra file in tests/
, add a excludePrivate
as a field in the testCases
struct for this specific option and then test if the correct (exported only) tags are returned.
I understand why you'd want to do it this way, as this will check all the different types of tags in all the testfiles. However, I think I'd prefer not to treat this option as a special case compared to the other tests. What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point - was attempting to avoid redundancy but you are right - that it isn't a special case. Will change the tests.
Added flag `-exclude-private` to chose to filter any symbols that are not public when building the tag file. This is very useful for building a tag file for the Go standard library or a third party API.
744370b
to
335eecb
Compare
Made requested changes and squashed commits |
@jstemmer Just wanted to remind you that this is ready to go. |
@ascarter a quick update: I'm in the middle of changing jobs (and moving to another country), so I haven't had time to check on my github projects. I should have a laptop and some time soon. I appreciate the time and effort you put into these PR's, sorry to keep you waiting. |
@jstemmer - any chance you might be able to merge the two pending PR's I submitted? Would love to have this in there instead of managing my own fork. Thanks! |
Added flag
-exclude-private
to chose to filter any symbols that are not public when building the tag file. This is very useful for building a tag file for the Go standard library or a third party API.