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