spiegel_podman/pkg/rootless
Kir Kolyshkin a94d273a8f
Replace os.Is* error checks with errors.Is
Using os.Is{Exist,NotExist,Permission} checks is not recommended in the
new code (see official documentation). While using it in the existing
code is OK, it may still result in a subtle errors later (for a specific
example of that, see [1]).

Replace those with errors.Is.

Generated by:

	gofmt -r 'os.IsExist(a) -> errors.Is(a, os.ErrExist)' -w .
	gofmt -r 'os.IsNotExist(a) -> errors.Is(a, os.ErrNotExist)' -w .
	gofmt -r 'os.IsPermission(a) -> errors.Is(a, os.ErrPermission)' -w .
	goimports -w .
	git diff vendor test/tools/vendor | patch -p1 -R

[1]: https://github.com/opencontainers/runc/pull/5061
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit 7f7b35356f)

[Added extra replacements manually that were only in the 5.8 tree]

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2026-06-04 19:38:16 +02:00
..
rootless.go Replace os.Is* error checks with errors.Is 2026-06-04 19:38:16 +02:00
rootless_freebsd.c pkg/rootless: Implement rootless.IsFdInherited on FreeBSD 2022-11-15 08:18:41 +00:00
rootless_freebsd.go lint: reenable revive unused-parameter check 2025-10-01 10:42:08 -04:00
rootless_linux.c rootless_linux.c: use shortcut for system commands 2025-11-26 10:18:30 +00:00
rootless_linux.go fileperms: newer Go 1.13+ octal literal format 2025-10-16 14:11:29 -04:00
rootless_test.go Cease using deprecated runc userlookup 2024-02-02 11:02:43 -05:00
rootless_unsupported.go lint: reenable revive unused-parameter check 2025-10-01 10:42:08 -04:00