commit | 4c4f7f33c9ed00de01c4c741d2177abfcfe19307 | [log] [tgz] |
---|---|---|
author | Jason A. Donenfeld <Jason@zx2c4.com> | Sat May 25 12:09:16 2019 +0200 |
committer | Alex Brainman <alex.brainman@gmail.com> | Sun Jun 02 01:53:25 2019 +0000 |
tree | d2008a5b8b3e3f72f8dc5655bdd8b48c749431a1 | |
parent | afe098805b5c041cf42e519b728c1f7de68f2974 [diff] |
windows: make it easier to iterate over groups and privileges Rather than having to write grotesque things like: groups, _ := processToken.GetTokenGroups() for _, g := range (*[(1 << 28) - 1]windows.SIDAndAttributes)(unsafe.Pointer(&groups.Groups[0]))[:groups.GroupCount] { // ... } Users can now write clean things like this: groups, _ := processToken.GetTokenGroups() for _, g := range groups.AllGroups() { // ... } Change-Id: Ief06de6899c497175628ff51b9d6ae55a90d14f1 Reviewed-on: https://go-review.googlesource.com/c/sys/+/178857 Run-TryBot: Jason Donenfeld <Jason@zx2c4.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
This repository holds supplemental Go packages for low-level interactions with the operating system.
The easiest way to install is to run go get -u golang.org/x/sys
. You can also manually git clone the repository to $GOPATH/src/golang.org/x/sys
.
This repository uses Gerrit for code changes. To learn how to submit changes to this repository, see https://golang.org/doc/contribute.html.
The main issue tracker for the sys repository is located at https://github.com/golang/go/issues. Prefix your issue with “x/sys:” in the subject line, so it is easy to find.