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
Remove reflect calls for doc generation #1259
Conversation
3f08bd4
to
7cd7ff7
Compare
This issue or PR has been automatically marked as stale because it has not had recent activity. Please add a comment bumping this if you're still interested in it's resolution! Thanks for your help, please let us know if you need anything else. |
Closing this as it has become stale. |
This issue or PR has been bumped and is no longer marked as stale! Feel free to bump it again in the future, if it's still relevant. |
Remove reflect calls for doc generation (#1259)
What type of PR is this?
What this PR does / why we need it:
Instead of using reflection to figure out values of fields, the doc generation interface has been extended to include everything needed to stringify a flag. Custom flags need to properly implement the interface to get the valid synopsis for flags
Which issue(s) this PR fixes:
Fixes #631
Special notes for your reviewer:
Since the SliceFlags were type checked in the stringify(Flag) function it makes more sense to move those directly to the individual flags
Testing
go test ./...
Release Notes
DocGenerationFlag has bee extended and all currently defined flag type have been modified to use this interface. This allows doc generation to be customizable without having to resort to reflection