Commit Graph

18 Commits

Author SHA1 Message Date
Kir Kolyshkin 83361ab356 Remove unneeded conversion
Those are the cases where the value being converted is already of that
type (checked to be that way for all os/arch combinations).

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2025-04-01 16:18:43 -07:00
Kir Kolyshkin 349f161996 internal/opts: Get: use slices.Contains
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2025-03-31 14:40:17 -07:00
Miloslav Trmač d85e01d983 Remove unused DefaultHTTPHost
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2025-03-14 04:57:23 +01:00
Daniel J Walsh 54ec28ec26 fix(deps): update module github.com/vbatts/tar-split to v0.11.3
Signed-off-by: Renovate Bot <bot@renovateapp.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2025-01-22 13:27:16 -05:00
openshift-merge-bot[bot] 7b354698f0 Merge pull request #2101 from kolyshkin/gofix
Remove old +build tags, add gofix ci job
2024-09-24 20:49:00 +00:00
Kir Kolyshkin 5b204503ff internal/opts: use strings.Cut
In some places, using strings.Cut (available since Go 1.18) instead of
strings.SplitN allows for simpler more readable code.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2024-09-19 17:03:22 -07:00
Kir Kolyshkin da5d42503c all: remove old-style +build tags
Brought to you by

	go fix ./...

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2024-09-19 17:00:48 -07:00
Miloslav Trmač 3c99b1999d Use slices.Delete* instead of manual append
Conservatively use Index* + Delete to delete the
first element where it's not obvious that the code would really
want to delete all instances.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2024-09-05 19:44:49 +02:00
Kir Kolyshkin fa414d963d Format sources with gofumpt
gofumpt is a superset of gofmt, enabling some more code formatting
rules.

This commit is brought to you by

	gofumpt -w .

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2023-05-26 16:17:31 -07:00
Daniel J Walsh 1bf0078883 Move to golang 1.18 and later
Github.com is reporting security issues on older versions of
golang.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-04-03 15:26:54 -04:00
Daniel J Walsh 58b34e82dd Remove dead code
ValidateDNSSearch is not used anywhere so remove it.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-01-11 13:06:23 -05:00
Paul Holzinger 3ed1c946be fix inconsitent go build tags
Run `go fmt ./...` which automatically adds the new build tag syntax.
This change is backwards compatible.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-11-02 20:51:27 +01:00
Miloslav Trmač 73a1b647c2 Add missing error checks in tests
... and remove one WriteFile that was always failing.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2022-10-14 17:17:54 +02:00
Miloslav Trmač 2839e5ce08 Misc. warning cleanups
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2022-10-01 02:53:06 +02:00
Daniel J Walsh c93f642c7e Fix problems found by codespell
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-09-11 10:49:59 -04:00
Daniel J Walsh 8fe24b1a52 Remove whitelist and replace with allowed
We want to remove insensitive terms from the codebase.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-07-08 13:57:32 -04:00
Sascha Grunert 524537729e Enable deadcode linter and fix lints
Signed-off-by: Sascha Grunert <sgrunert@suse.com>
2020-01-28 15:59:15 +01:00
Valentin Rothberg 5312ccefd8 Move opts to internal/opts and fork docker filters
The dependency on docker's filter package prevents us from using newer
versions of docker/moby where the package's API has changed.  The filter
package is small enough to justify maintaining a small fork of it. Also,
since the opts package is only used for the `containers-storage` binary
and is not part of the actual storage library, move it to the ./internal
directory to make it clearer that this is an internal API.

Fixes: containers/storage#450
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2019-10-29 13:12:13 +01:00