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

runtime: improve documentation on SetFinalizer #16301

Closed
carl-mastrangelo opened this issue Jul 8, 2016 · 3 comments
Closed

runtime: improve documentation on SetFinalizer #16301

carl-mastrangelo opened this issue Jul 8, 2016 · 3 comments

Comments

@carl-mastrangelo
Copy link
Contributor

The documentation for SetFinalizer uses named variables obj and finalizer in the method signature, but refers to x and f in the documentation comment. This makes it harder to read, since the doc refers to hypothetical variables rather than the ones used by the function.

Additionally, later down in the comment obj:

It is not guaranteed that a finalizer will run if the size of *obj is zero bytes.

I believe this already tricky method would be easier to understand if the doc used consistent terminology.

@cespare
Copy link
Contributor

cespare commented Jul 8, 2016

@carl-mastrangelo it seems that this is already fixed on tip (which you linked).

@bradfitz
Copy link
Contributor

bradfitz commented Jul 8, 2016

Yes, fixed by 1d809c5

@bradfitz bradfitz closed this as completed Jul 8, 2016
@carl-mastrangelo
Copy link
Contributor Author

d'oh! Sorry for the noise!

@golang golang locked and limited conversation to collaborators Jul 8, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants