Skip to content

Commit d6a5209

Browse files
committed
mount: rm unneeded errorlint annotation
golangci-lint v1.54.2 comes with errorlint v1.4.4, which contains the fix [1] whitelisting all errno comparisons for errors coming from x/sys/unix. Remove the annotation that is no longer needed. Unfortunately, switch on a bare unix error (in mountinfo) still needs to be annotated (see [2]). [1] polyfloyd/go-errorlint#47 [2] polyfloyd/go-errorlint#54 Signed-off-by: Kir Kolyshkin <[email protected]>
1 parent c8f0d56 commit d6a5209

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

mount/mount_unix.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ func Mount(device, target, mType, options string) error {
2323
// a normal unmount. If target is not a mount point, no error is returned.
2424
func Unmount(target string) error {
2525
err := unix.Unmount(target, mntDetach)
26-
if err == nil || err == unix.EINVAL { //nolint:errorlint // unix errors are bare
26+
if err == nil || err == unix.EINVAL {
2727
// Ignore "not mounted" error here. Note the same error
2828
// can be returned if flags are invalid, so this code
2929
// assumes that the flags value is always correct.

0 commit comments

Comments
 (0)