File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -1031,7 +1031,7 @@ func (g *Generator) AddDevice(device rspec.LinuxDevice) {
10311031 g .spec .Linux .Devices = append (g .spec .Linux .Devices , device )
10321032}
10331033
1034- //RemoveDevice remove a device from g.spec.Linux.Devices
1034+ // RemoveDevice remove a device from g.spec.Linux.Devices
10351035func (g * Generator ) RemoveDevice (path string ) error {
10361036 if g .spec == nil || g .spec .Linux == nil || g .spec .Linux .Devices == nil {
10371037 return nil
@@ -1046,6 +1046,7 @@ func (g *Generator) RemoveDevice(path string) error {
10461046 return nil
10471047}
10481048
1049+ // ClearLinuxDevices clears g.spec.Linux.Devices
10491050func (g * Generator ) ClearLinuxDevices () {
10501051 if g .spec == nil || g .spec .Linux == nil || g .spec .Linux .Devices == nil {
10511052 return
Original file line number Diff line number Diff line change @@ -259,7 +259,7 @@ func (v *Validator) CheckProcess() (msgs []string) {
259259 }
260260 }
261261
262- msgs = append (msgs , v .CheckCapablities ()... )
262+ msgs = append (msgs , v .CheckCapabilities ()... )
263263 msgs = append (msgs , v .CheckRlimits ()... )
264264
265265 if v .spec .Platform .OS == "linux" {
@@ -276,7 +276,8 @@ func (v *Validator) CheckProcess() (msgs []string) {
276276 return
277277}
278278
279- func (v * Validator ) CheckCapablities () (msgs []string ) {
279+ // CheckCapabilities checks v.spec.Process.Capabilities
280+ func (v * Validator ) CheckCapabilities () (msgs []string ) {
280281 process := v .spec .Process
281282 if v .spec .Platform .OS == "linux" {
282283 var caps []string
@@ -309,6 +310,7 @@ func (v *Validator) CheckCapablities() (msgs []string) {
309310 return
310311}
311312
313+ // CheckRlimits checks v.spec.Process.Rlimits
312314func (v * Validator ) CheckRlimits () (msgs []string ) {
313315 process := v .spec .Process
314316 for index , rlimit := range process .Rlimits {
You can’t perform that action at this time.
0 commit comments