Skip to content
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

docs: mention defaults in option docs #1013

Merged
merged 1 commit into from Jul 12, 2022

Conversation

costela
Copy link
Contributor

@costela costela commented Jul 12, 2022

Currently finding out the defaults when using the code is a bit cumbersome: most IDEs will give you the docs for the option (e.g. nats.MaxReconnects), which currently doesn't mention the defaults. So you have to go to the full docs and click around before getting to the constants.

I propose adding the current defaults directly to the method/struct docs, so they are easier to find when coding, without "breaking the flow".

This has the downside of needing more care to be kept up-to-date, but I would argue the trade-off is worth it.

WDYT?

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.02%) to 83.975% when pulling 891dbe3 on costela:docs/mention-defaults-in-option-docs into 8a4b9f4 on nats-io:main.

Copy link
Member

@kozlovic kozlovic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks!

@kozlovic kozlovic merged commit 2d22c44 into nats-io:main Jul 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants