Commit Graph

10 Commits

Author SHA1 Message Date
Jan Kaluza a0a9ac6380 Switch common, storage and image to monorepo.
Signed-off-by: Jan Kaluza <jkaluza@redhat.com>
2025-08-29 15:04:28 +02:00
Nalin Dahyabhai 7944b4b2b0 Use containers/common's formats package instead of our own
Use the containers/common "formats" package, which started off as a copy
of our own and is still mostly the same, instead of our own.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2025-06-23 15:53:55 -04:00
Kir Kolyshkin 1ede7ddce7 Use any instead of interface{}
Brought to you by

	gofmt -r 'interface{} -> any' -w .

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2025-04-08 10:19:51 -07:00
Kir Kolyshkin f9aed9704e Use strings.ReplaceAll to fix QF1004 warnings
These:

> cmd/buildah/images.go:192:10: QF1004: could use strings.ReplaceAll instead (staticcheck)
> 		return strings.Replace(opts.format, `\t`, "\t", -1)
> 		       ^
> pkg/formats/formats.go:97:16: QF1004: could use strings.ReplaceAll instead (staticcheck)
> 		t.Template = strings.Replace(strings.TrimSpace(t.Template[5:]), " ", "\t", -1)
> 		             ^
> tests/testreport/testreport.go:328:13: QF1004: could use strings.ReplaceAll instead (staticcheck)
> 		sysctl := strings.Replace(path, "/", ".", -1)
> 		          ^

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2025-04-07 13:01:56 -07:00
Kir Kolyshkin fd3aba9917 *: use gofmt -s, add gofmt linter
1. Use gofmt to format the code:

	git ls-files \*.go | grep -Ev '/?vendor/' | xargs gofmt -w -s

2. Add gofmt to golangci-lint (it's not enabled by default).

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2024-08-09 17:05:58 -07:00
Eng Zer Jun 7a5a18334a
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.

[NO NEW TESTS NEEDED]

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2023-06-28 22:11:19 +08:00
Sascha Grunert ce384684c0
Switch to golang native error wrapping
We now use the golang error wrapping format specifier `%w` instead of
the deprecated github.com/pkg/errors package.

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
2022-07-07 11:41:47 +02:00
Nalin Dahyabhai 1ec4983d50 Replace golang.org/x/crypto/ssh/terminal with golang.org/x/term
The golang.org/x/crypto/ssh/terminal package has been deprecated and
replaced upstream by golang.org/x/term, so switch to that.  It's a
simple 1:1 replacement.

[NO NEW TESTS NEEDED]

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2021-08-24 15:35:12 -04:00
Nalin Dahyabhai b39191d960 images: suppress a spurious blank line with no images
When listing images when there are no images, avoid outputting an
unnecessary newline.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>

Closes: #1418
Approved by: TomSweeneyRedHat
2019-03-20 08:26:45 +00:00
Qi Wang a9f718beb1 fix bug images use the template to print results
Signed-off-by: Qi Wang <qiwan@redhat.com>
2019-03-12 09:46:18 -04:00