Commit Graph

18 Commits

Author SHA1 Message Date
Kir Kolyshkin b7fb12e894 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 f18c423ea3 internal/opts: Get: use slices.Contains
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2025-03-31 14:40:17 -07:00
Miloslav Trmač 587fae5b7f Remove unused DefaultHTTPHost
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2025-03-14 04:57:23 +01:00
Daniel J Walsh e5f427b4ce
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] ebd463a126
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 aebaa48d78 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 83c0c077c5 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č 1fa3161756 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 a4d8f720a2 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 a3204cf7e8
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 29bfc3ad9b
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 bb74ff653c
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č 2d90000b09 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č f42467020f Misc. warning cleanups
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2022-10-01 02:53:06 +02:00
Daniel J Walsh e0baaad357
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 2bdcc044ac
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 ba51455527
Enable deadcode linter and fix lints
Signed-off-by: Sascha Grunert <sgrunert@suse.com>
2020-01-28 15:59:15 +01:00
Valentin Rothberg c677b7d069 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: #450
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2019-10-29 13:12:13 +01:00