mirror of
https://github.com/opencontainers/runc.git
synced 2026-07-11 06:03:57 +08:00
Fix staticcheck ST1020/ST1021 warnings
I was pretty sure we have a linter for these but apparently we did not. > libcontainer/capabilities/capabilities.go:108:1: ST1020: comment on exported method ApplyCaps should be of the form "ApplyCaps ..." (staticcheck) > // Apply sets all the capabilities for the current process in the config. > ^ > > > types/events.go:15:1: ST1021: comment on exported type Stats should be of the form "Stats ..." (with optional leading article) (staticcheck) > // stats is the runc specific stats structure for stability when encoding and decoding stats. > ^ Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
@@ -105,7 +105,7 @@ func (c *Caps) ApplyBoundingSet() error {
|
|||||||
return c.pid.Apply(capability.BOUNDING)
|
return c.pid.Apply(capability.BOUNDING)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Apply sets all the capabilities for the current process in the config.
|
// ApplyCaps sets all the capabilities for the current process in the config.
|
||||||
func (c *Caps) ApplyCaps() error {
|
func (c *Caps) ApplyCaps() error {
|
||||||
if c.pid == nil {
|
if c.pid == nil {
|
||||||
return nil
|
return nil
|
||||||
|
|||||||
+1
-1
@@ -12,7 +12,7 @@ type Event struct {
|
|||||||
Data interface{} `json:"data,omitempty"`
|
Data interface{} `json:"data,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// stats is the runc specific stats structure for stability when encoding and decoding stats.
|
// Stats is the runc specific stats structure for stability when encoding and decoding stats.
|
||||||
type Stats struct {
|
type Stats struct {
|
||||||
CPU Cpu `json:"cpu"`
|
CPU Cpu `json:"cpu"`
|
||||||
CPUSet CPUSet `json:"cpuset"`
|
CPUSet CPUSet `json:"cpuset"`
|
||||||
|
|||||||
Reference in New Issue
Block a user