浏览代码

oci: fix SA4009: argument e is overwritten before first use (staticcheck)

```
oci/devices_linux.go:64:72: SA4009: argument e is overwritten before first use (staticcheck)
```

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Sebastiaan van Stijn 5 年之前
父节点
当前提交
4a3ee04351
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      oci/devices_linux.go

+ 2 - 1
oci/devices_linux.go

@@ -61,7 +61,8 @@ func DevicesFromPath(pathOnHost, pathInContainer, cgroupPermissions string) (dev
 		if src, e := os.Stat(resolvedPathOnHost); e == nil && src.IsDir() {
 
 			// mount the internal devices recursively
-			filepath.Walk(resolvedPathOnHost, func(dpath string, f os.FileInfo, e error) error {
+			// TODO check if additional errors should be handled or logged
+			_ = filepath.Walk(resolvedPathOnHost, func(dpath string, f os.FileInfo, _ error) error {
 				childDevice, e := devices.DeviceFromPath(dpath, cgroupPermissions)
 				if e != nil {
 					// ignore the device