Commit Graph

13 Commits

Author SHA1 Message Date
Kir Kolyshkin 8b1718ffee pkg: do not capitalize error strings
This fixes the following linter warnings:

> pkg/auth/auth.go:176:11: ST1005: error strings should not be capitalized (staticcheck)
> 			return errors.New("Can't specify both --password-stdin and --password")
> 			       ^
> pkg/auth/auth.go:179:11: ST1005: error strings should not be capitalized (staticcheck)
> 			return errors.New("Must provide --username with --password-stdin")
> 			       ^
> pkg/subscriptions/subscriptions.go:325:17: ST1005: error strings should not be capitalized (staticcheck)
> 		return false, fmt.Errorf("Container /etc resolution error: %w", err)
> 		              ^
> pkg/subscriptions/subscriptions.go:325:17: ST1005: error strings should not be capitalized (staticcheck)
> 		return false, fmt.Errorf("Container /etc resolution error: %w", err)
> 		              ^
> pkg/subscriptions/subscriptions.go:334:17: ST1005: error strings should not be capitalized (staticcheck)
> 		return false, fmt.Errorf("Container /etc/system-fips resolution error: %w", err)
> 		              ^
> pkg/subscriptions/subscriptions.go:451:10: ST1005: error strings should not be capitalized (staticcheck)
> 		return fmt.Errorf("Could not expand %q in container: %w", srcPolicyConfig, err)
> 		       ^

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2025-03-26 09:36:14 -07:00
Oleksandr Redko ba4c7c98bb chore: remove outdated build constraints
Signed-off-by: Oleksandr Redko <Oleksandr_Redko@epam.com>
2024-01-03 22:56:00 +02:00
Daniel J Walsh a5698c8b06 Fix stutters
Podman adds an Error: to every error message. So starting an error
message with "error" ends up being reported to the user as

Error: error ...

This patch removes the stutter.

Also ioutil.ReadFile errors report the Path, so wrapping the err message
with the path causes a stutter.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-08-27 08:05:03 -04:00
Sascha Grunert 426d69c00f Switch to golang native error wrapping
`github.com/pkg/errors` is deprecated since quite some time so we now
use the native error wrapping for more idiomatic golang.

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
2022-07-12 10:54:07 +02:00
OpenShift Merge Robot 6cf5b6de61 Merge pull request #1026 from dfr/freebsd
Config changes and pkg/parse fixes for FreeBSD
2022-05-10 16:26:08 -04:00
Doug Rabson 70b14e353c Enable DeviceFromPath on FreeBSD
Signed-off-by: Doug Rabson <dfr@rabson.org>
2022-05-09 14:07:58 +01:00
Paul Holzinger 63d80d9e2d enable prealloc and makezero linters
Wherever possible slices should be allocated with the correct capacity to
avoid unnecessary memory allocations.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-05-09 14:39:51 +02:00
Valentin Rothberg 095aded91c go fmt: use go 1.18 conditional-build syntax
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-03-18 11:04:40 +01:00
Daniel J Walsh 417d17cba5 [NO TESTS NEEDED] Remove some stuttering on return errors
golang builtin OS functions, include the path to the object being used,
no reason for us to wrap these errors with an object for a second time.

This just causes stuttering, and looks bad at the CLI level.

Existing tests should catch any errors.

Also stop adding "error" to something that is obviusly an error when it
shows up to the user.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-03-29 10:33:18 -04:00
dependabot-preview[bot] 86eb56d2fa Bump github.com/containers/image/v5 from 5.10.2 to 5.10.3
Bumps [github.com/containers/image/v5](https://github.com/containers/image) from 5.10.2 to 5.10.3.
- [Release notes](https://github.com/containers/image/releases)
- [Commits](https://github.com/containers/image/compare/v5.10.2...v5.10.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-02-23 05:35:14 -05:00
Valentin Rothberg f2537f0a33 Revert "Bump github.com/opencontainers/runc from 1.0.0-rc91 to 1.0.0-rc93"
This reverts commit fc61280ca0.

The bump of the gocapability package is causing regressions in Podman.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-02-06 13:01:04 +01:00
dependabot-preview[bot] fc61280ca0 Bump github.com/opencontainers/runc from 1.0.0-rc91 to 1.0.0-rc93
Bumps [github.com/opencontainers/runc](https://github.com/opencontainers/runc) from 1.0.0-rc91 to 1.0.0-rc93.
- [Release notes](https://github.com/opencontainers/runc/releases)
- [Commits](https://github.com/opencontainers/runc/compare/v1.0.0-rc91...v1.0.0-rc93)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-02-05 06:53:46 -05:00
Daniel J Walsh f9bd8a21b0 Move some volume and device parsing from buildah to common
We want to split out buildah/pkg/parse for components other
containers/engines are using without pulling in the buildah library.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-11-18 08:43:35 -05:00