Skip to content

Commit 627054d

Browse files
committed
lint/revive: add package doc comments
This silences all of the "should have a package comment" lint warnings from golangci-lint. Signed-off-by: Aleksa Sarai <[email protected]>
1 parent 8b06dd8 commit 627054d

File tree

27 files changed

+96
-12
lines changed

27 files changed

+96
-12
lines changed

contrib/cmd/memfd-bind/memfd-bind.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,17 @@
1515
* limitations under the License.
1616
*/
1717

18+
// memfd-bind is a command-line tool to construct a persistent
19+
// sealed-memfd-copy of a binary, to allow administrators to amortise the cost
20+
// of memfd cloning for runc. runc will not make its own copy of the binary if
21+
// it detects that the binary is already a sealed-memfd-copy.
22+
//
23+
// Usage of this tool has a lot of caveats -- see this package's README for
24+
// more details on what restrictions apply when using this tool.
25+
//
26+
// Deprecated: runc 1.2 and later use a different mechanism for protecting the
27+
// runc binary that obviates the need for this tool. Unless you are on an old
28+
// kernel or need to use an older runc version, this tool is no longer needed.
1829
package main
1930

2031
import (

internal/linux/doc.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// Package linux provides minimal wrappers around Linux system calls, primarily
2+
// to provide support for automatic EINTR-retries.
3+
package linux

libcontainer/apparmor/apparmor.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Package apparmor provides a minimal set of helpers to configure the AppArmor
2+
// profile of the current process, effectively acting as a very stripped-down
3+
// version of libapparmor.
14
package apparmor
25

36
import "errors"

libcontainer/capabilities/capabilities.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
//go:build linux
22

3+
// Package capabilities provides helpers for managing Linux capabilities.
34
package capabilities
45

56
import (

libcontainer/devices/doc.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// Package devices provides some helper functions for constructing device
2+
// configurations for runc. These are exclusively used by higher-level runtimes
3+
// that need to configure runc's device list based on existing devices.
4+
package devices

libcontainer/exeseal/doc.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// Package exeseal provides mechanisms for sealing /proc/self/exe and thus
2+
// protecting the runc binary against CVE-2019-5736-style attacks.
3+
package exeseal

libcontainer/integration/doc.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
// integration is used for integration testing of libcontainer
1+
// Package integration is used for integration testing of libcontainer.
22
package integration
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
// Package userns provides helpers for interacting with Linux user namespaces.
2+
package userns

libcontainer/keys/keyctl.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// Package keys provides helpers for Linux keyrings.
12
package keys
23

34
import (

libcontainer/logs/logs.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// Package logs provides helpers for logging used within runc (specifically for
2+
// forwarding logs from "runc init" to the main runc process).
13
package logs
24

35
import (

0 commit comments

Comments
 (0)