Conversation
types/process.go
Outdated
| // On Linux and Darwin (macOS) this is the real user ID. | ||
| // On Windows, this is the security identifier (SID) of the | ||
| // user account of the process access token. | ||
| Uid string `json:"uid"` |
There was a problem hiding this comment.
Fyi, I first had it as UID but changed it to Uid to be like Golang's User.
There was a problem hiding this comment.
What do you think about going our own way and capitalizing each of these acronyms? Or do you have any insight why the os/user package doesn't follow this practice?
There was a problem hiding this comment.
We can capitalize, that was my first instinct as well. I looked at the history of os/user - it has been Uid/Gid since when it was introduced some 8 years ago. So maybe back then the Go coding standards were not as consistent.
types/process.go
Outdated
| // On Linux and Darwin (macOS) this is the real user ID. | ||
| // On Windows, this is the security identifier (SID) of the | ||
| // user account of the process access token. | ||
| Uid string `json:"uid"` |
There was a problem hiding this comment.
What do you think about going our own way and capitalizing each of these acronyms? Or do you have any insight why the os/user package doesn't follow this practice?
Adds a
User()function toProcessand implements it for all providers.For Linux and Darwin (macOS) this retrieves the real, effective, and saved user and group IDs.
For Windows, this retrieves the user and primary group SID.
It does not retrieve the Linux-specific filesystem UID and GID because its use has been deprecated for a long time (since 1995, I believe).
Closes #10.