Commit Graph

8 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
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
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 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
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
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