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

proposal: golang.org/x/sys/windows: export getProcessEntry #57474

Open
thaJeztah opened this issue Dec 27, 2022 · 2 comments
Open

proposal: golang.org/x/sys/windows: export getProcessEntry #57474

thaJeztah opened this issue Dec 27, 2022 · 2 comments

Comments

@thaJeztah
Copy link
Contributor

The getProcessEntry code is currently duplicated in https://github.com/inconshreveable/mousetrap, which is widely used in projects (commonly as dependency for spf13/cobra). Until recently, mousetrap had code for backward-compatibility with old Go versions, but now that that code was removed, it's a very small wrapper around getProcessEntry. Exporting this function allows mousetrap to not having to duplicate the code, or for projects currently depending on mousetrap to consume the golang.org/x/sys code directly (most projects would already have golang.org/x/sys as dependency in some form or another).

Looking at the history for getProcessEntry, I see that this function was originally contributed by the author of Mousetrap (as a helper for Getppid(); see 6f6f1bd / https://codereview.appspot.com/102320044), and there have been no changes since its inception. From that perspective, I estimate it won't add additional maintenance costs to the x/sys project.

@gopherbot gopherbot added this to the Proposal milestone Dec 27, 2022
@ianlancetaylor ianlancetaylor moved this to Incoming in Proposals Dec 27, 2022
@ianlancetaylor
Copy link
Member

CC @golang/windows

@ianlancetaylor
Copy link
Member

The current getProcessEntry function is undocumented. Can you write an example doc comment for GetProcessEntry? Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Incoming
Development

No branches or pull requests

3 participants