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>
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>
`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>
Wherever possible slices should be allocated with the correct capacity to
avoid unnecessary memory allocations.
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
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>
This reverts commit fc61280ca0.
The bump of the gocapability package is causing regressions in Podman.
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
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>