Skip to content

Commit 47ce36c

Browse files
author
Mrunal Patel
authored
Merge pull request #372 from Mashimiao/tfix-format-comment
tfix and format comment
2 parents 8addcc6 + 9087a63 commit 47ce36c

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

generate/generate.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff 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
10351035
func (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
10491050
func (g *Generator) ClearLinuxDevices() {
10501051
if g.spec == nil || g.spec.Linux == nil || g.spec.Linux.Devices == nil {
10511052
return

validate/validate.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff 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
312314
func (v *Validator) CheckRlimits() (msgs []string) {
313315
process := v.spec.Process
314316
for index, rlimit := range process.Rlimits {

0 commit comments

Comments
 (0)