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

Comments

Projects
None yet
4 participants
@carl-mastrangelo
Copy link
Member

commented Jul 8, 2016

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

This comment has been minimized.

Copy link
Contributor

commented Jul 8, 2016

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

@bradfitz

This comment has been minimized.

Copy link
Member

commented Jul 8, 2016

Yes, fixed by 1d809c5

@bradfitz bradfitz closed this Jul 8, 2016

@carl-mastrangelo

This comment has been minimized.

Copy link
Member Author

commented Jul 8, 2016

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.
You can’t perform that action at this time.