-
Notifications
You must be signed in to change notification settings - Fork 18.8k
Closed
Milestone
Description
While fixing an issue (#60223) with the existing windows.EnumProcesses we had to introduce some manually written code wrapping what mkwinsyscall can generate and realized that the function signature we have is quite weird: it has *uint32 in its second parameter to return the number of bytes taken by the data added to the processIds slice.
It would be much more ergonomic to have an API that looks like
func EnumProcesses(processIds []uint32) (n int, err error)
where n has the number of items added to the input slice.
To keep backward compatibility, we would need to keep the old function and add a new one with a different name. So the final proposal is to add EnumProcs with the signature below and to mark EnumProcesses as deprecated.
func EnumProcs(processIds []uint32) (n int, err error)
I do have a need for this function, but am I alone?
bcmills