Commit Graph

7 Commits

Author SHA1 Message Date
Oleksandr Redko 63869c6bf3 chore: replace 'interface{}' with 'any' for consistency
Signed-off-by: Oleksandr Redko <Oleksandr_Redko@epam.com>
2024-01-08 21:26:34 +02:00
Valentin Rothberg 1fa8b65281 linters: enable forbidigo
Selectively disable cases that I cannot touch or don't bother spending
time on.  Future cases will be avoided.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-09-01 11:08:17 +02:00
Eng Zer Jun 45ff267f1d chore: replace `github.com/ghodss/yaml` with `sigs.k8s.io/yaml`
At the time of making this commit, the package `github.com/ghodss/yaml`
is no longer actively maintained.

`sigs.k8s.io/yaml` is a permanent fork of `ghodss/yaml` and is actively
maintained by Kubernetes SIG.

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2023-07-09 17:52:12 +08: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
Valentin Rothberg 32a28aee73 new libimage package
The new `libimage` package is an attempt to consolidate the code for
managing container images and performing operations on them such as
pulling, pushing, saving, searching, local lookups, removing etc.

Over time, Buildah, CRI-O and Podman diverged with respect to managing
container images resulting in a high amount of code duplication
rendering the tools harder to maintain (e.g., bug fixes) and harder to
extend (e.g., adding new features) than necessary.

The desire to share all that code in a common library grew and this is
an attempt to address the it.

The changes as they are now pass Buildah CI [1].  Once merged into
Buildah, I expect follow up changes when migrating Podman over to
`libimage`.

Miscellaneous changes:

* Copy `podman/pkg/signal` to `pkg/signal`.

* Copy `buildah/manifests` to `image/manifests`. Note that the unit
  tests require root privileges. Skip()'s are added when running
  rootless.  Currently excluded from linting.

* Copy `buildah/pkg/manifests` to `pkg/manifests`.  Currently excluded
  from linting.

* Copy `buildah/pkg/supplemented` to `pkg/supplemented`.  Currently
  excluded from linting.

[1] github.com/containers/buildah/pull/3148

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-04-21 11:17:47 +02: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
Daniel J Walsh 02dc7d04d4 Move buildah/pkg/formats to common/pkg/formats
We want to use pkg/formats within skopeo, but
do not want to pull buildah code in.  Moving this
to common would make the vendoring easier.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-10-09 10:38:54 -04:00