Commit Graph

5 Commits

Author SHA1 Message Date
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 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
Miloslav Trmač 2839e5ce08 Misc. warning cleanups
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2022-10-01 02:53:06 +02: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