diff options
author | Sebastiaan van Stijn <github@gone.nl> | 2022-07-08 18:27:07 +0200 |
---|---|---|
committer | Sebastiaan van Stijn <github@gone.nl> | 2022-07-08 19:56:23 +0200 |
commit | 52c1a2fae8ffe3efc8b24ef53a702582131ebc57 (patch) | |
tree | 32566addcaabbe5a2d50e8039da88d8223d6ada9 /oci | |
parent | 6668801d4056cf2e59eff2b23620b9d8a4043734 (diff) | |
download | docker-52c1a2fae8ffe3efc8b24ef53a702582131ebc57.tar.gz |
gofmt GoDoc comments with go1.19
Older versions of Go don't format comments, so committing this as
a separate commit, so that we can already make these changes before
we upgrade to Go 1.19.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Diffstat (limited to 'oci')
-rw-r--r-- | oci/oci.go | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/oci/oci.go b/oci/oci.go index c64077da76..2021ec3538 100644 --- a/oci/oci.go +++ b/oci/oci.go @@ -8,13 +8,14 @@ import ( specs "github.com/opencontainers/runtime-spec/specs-go" ) -// TODO verify if this regex is correct for "a" (all); the docs (https://github.com/torvalds/linux/blob/v5.10/Documentation/admin-guide/cgroup-v1/devices.rst) describe: -// "'all' means it applies to all types and all major and minor numbers", and shows an example -// that *only* passes `a` as value: `echo a > /sys/fs/cgroup/1/devices.allow, which would be -// the "implicit" equivalent of "a *:* rwm". Source-code also looks to confirm this, and returns -// early for "a" (all); https://github.com/torvalds/linux/blob/v5.10/security/device_cgroup.c#L614-L642 -//nolint: gosimple -var deviceCgroupRuleRegex = regexp.MustCompile("^([acb]) ([0-9]+|\\*):([0-9]+|\\*) ([rwm]{1,3})$") +// TODO verify if this regex is correct for "a" (all); +// +// The docs (https://github.com/torvalds/linux/blob/v5.10/Documentation/admin-guide/cgroup-v1/devices.rst) describe: +// "'all' means it applies to all types and all major and minor numbers", and shows an example +// that *only* passes `a` as value: `echo a > /sys/fs/cgroup/1/devices.allow, which would be +// the "implicit" equivalent of "a *:* rwm". Source-code also looks to confirm this, and returns +// early for "a" (all); https://github.com/torvalds/linux/blob/v5.10/security/device_cgroup.c#L614-L642 +var deviceCgroupRuleRegex = regexp.MustCompile("^([acb]) ([0-9]+|\\*):([0-9]+|\\*) ([rwm]{1,3})$") //nolint: gosimple // SetCapabilities sets the provided capabilities on the spec // All capabilities are added if privileged is true. |