diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f8caeec..735e858 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -63,7 +63,7 @@ jobs: fetch-depth: 25 - name: Dependencies - run: go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.55.0 + run: go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.62.0 - name: Lint shell: bash diff --git a/devices/devices_unix.go b/devices/devices_unix.go index 451979b..741cf47 100644 --- a/devices/devices_unix.go +++ b/devices/devices_unix.go @@ -38,14 +38,14 @@ func DeviceInfo(fi os.FileInfo) (uint64, uint64, error) { } // mknod provides a shortcut for syscall.Mknod -func Mknod(p string, mode os.FileMode, maj, min int) error { +func Mknod(p string, mode os.FileMode, major, minor int) error { var ( m = syscallMode(mode.Perm()) dev uint64 ) if mode&os.ModeDevice != 0 { - dev = unix.Mkdev(uint32(maj), uint32(min)) + dev = unix.Mkdev(uint32(major), uint32(minor)) if mode&os.ModeCharDevice != 0 { m |= unix.S_IFCHR diff --git a/driver/driver.go b/driver/driver.go index e5d9d0f..9004cbe 100644 --- a/driver/driver.go +++ b/driver/driver.go @@ -109,7 +109,7 @@ type LXAttrDriver interface { } type DeviceInfoDriver interface { - DeviceInfo(fi os.FileInfo) (maj uint64, min uint64, err error) + DeviceInfo(fi os.FileInfo) (major uint64, minor uint64, err error) } // driver is a simple default implementation that sends calls out to the "os" diff --git a/driver/driver_unix.go b/driver/driver_unix.go index ea205f4..dc98523 100644 --- a/driver/driver_unix.go +++ b/driver/driver_unix.go @@ -128,6 +128,6 @@ func (d *driver) LSetxattr(path string, attrMap map[string][]byte) error { return nil } -func (d *driver) DeviceInfo(fi os.FileInfo) (maj uint64, min uint64, err error) { +func (d *driver) DeviceInfo(fi os.FileInfo) (major uint64, minor uint64, err error) { return devices.DeviceInfo(fi) } diff --git a/fs/diff_linux.go b/fs/diff_linux.go index 376f13c..e8c6702 100644 --- a/fs/diff_linux.go +++ b/fs/diff_linux.go @@ -51,11 +51,11 @@ func overlayFSWhiteoutConvert(diffDir, path string, f os.FileInfo, changeFn Chan return false, nil } - maj, min, err := devices.DeviceInfo(f) + major, minor, err := devices.DeviceInfo(f) if err != nil { return false, err } - return (maj == 0 && min == 0), nil + return (major == 0 && minor == 0), nil } if f.IsDir() { diff --git a/fs/fstest/file.go b/fs/fstest/file.go index 97e882e..efdb667 100644 --- a/fs/fstest/file.go +++ b/fs/fstest/file.go @@ -111,9 +111,9 @@ func CreateDir(name string, perm os.FileMode) Applier { } // Rename returns a file applier which renames a file -func Rename(old, new string) Applier { +func Rename(oldpath, newpath string) Applier { return applyFn(func(root string) error { - return os.Rename(filepath.Join(root, old), filepath.Join(root, new)) + return os.Rename(filepath.Join(root, oldpath), filepath.Join(root, newpath)) }) } diff --git a/fs/fstest/file_unix.go b/fs/fstest/file_unix.go index a19e3e5..738ffe7 100644 --- a/fs/fstest/file_unix.go +++ b/fs/fstest/file_unix.go @@ -48,10 +48,10 @@ func Lchtimes(name string, atime, mtime time.Time) Applier { } // CreateDeviceFile provides creates devices Applier. -func CreateDeviceFile(name string, mode os.FileMode, maj, min int) Applier { +func CreateDeviceFile(name string, mode os.FileMode, major, minor int) Applier { return applyFn(func(root string) error { fullPath := filepath.Join(root, name) - return devices.Mknod(fullPath, mode, maj, min) + return devices.Mknod(fullPath, mode, major, minor) }) } diff --git a/fs/fstest/file_windows.go b/fs/fstest/file_windows.go index 3833169..03fd5af 100644 --- a/fs/fstest/file_windows.go +++ b/fs/fstest/file_windows.go @@ -37,7 +37,7 @@ func Lchtimes(name string, atime, mtime time.Time) Applier { } // CreateDeviceFile provides creates devices Applier. -func CreateDeviceFile(name string, mode os.FileMode, maj, min int) Applier { +func CreateDeviceFile(name string, mode os.FileMode, major, minor int) Applier { return applyFn(func(root string) error { return errors.New("Not implemented") })