Commit Graph

8 Commits

Author SHA1 Message Date
Kir Kolyshkin b951b72412 Gofumpt the code
gofumpt is a stricter version of gofmt, basically making the code more
readable, and fixing the gocritic's octalLiterar warnings like this one:

	pkg/util/util_supported.go:26:17: octalLiteral: use new octal literal style, 0o722 (gocritic)
		return (perm & 0722) == 0700
			       ^

Generated by gofumpt -w .

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2022-04-09 16:50:11 -07:00
Giuseppe Scrivano 5eef1234ed parse: allow extra options for idmap
allow to pass extra information for idmap down to the OCI runtime.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2022-02-14 17:33:00 +01:00
Aditya Rajan 57ce3a50bc parse: extend ValidateVolumeOpts to support advanced overlay options
Relax ValidateVolumeOpts to support more verbose options for overlay
example `upperdir, workdir` and in future maybe `volatile`.

Signed-off-by: Aditya R <arajan@redhat.com>
2022-01-18 17:29:08 +05:30
Giuseppe Scrivano 3d21449ece parse: accept idmap
needed by https://github.com/containers/podman/pull/12298

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2021-11-15 15:29:12 +01:00
flouthoc e278dcf7ef path: dest paths inside container should always be treated as *nix type
Destination path inside containers should be always validated  as
*nix absolute path. So its recommended to use path.IsAbs() instead of
filepath.IsAbs().

[NO TEST NEEDED]

Signed-off-by: flouthoc <flouthoc.git@gmail.com>
2021-08-16 09:46:05 +05:30
Daniel J Walsh 417d17cba5 [NO TESTS NEEDED] Remove some stuttering on return errors
golang builtin OS functions, include the path to the object being used,
no reason for us to wrap these errors with an object for a second time.

This just causes stuttering, and looks bad at the CLI level.

Existing tests should catch any errors.

Also stop adding "error" to something that is obviusly an error when it
shows up to the user.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-03-29 10:33:18 -04:00
Eduardo Vega f78dc39440 Add U volume flag and chown pkg
Signed-off-by: Eduardo Vega <edvegavalerio@gmail.com>
2021-01-29 10:57:49 -06:00
Daniel J Walsh f9bd8a21b0 Move some volume and device parsing from buildah to common
We want to split out buildah/pkg/parse for components other
containers/engines are using without pulling in the buildah library.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-11-18 08:43:35 -05:00