cmd/initContainer: Conform to gofmt changes in Go 1.19

CentOS Stream 9 has golang-1.19.2, while so far the 'unit tests' were
being run on Fedora 36, which only has golang-1.18.8.

This is a step towards testing on CentOS Stream 9.

https://github.com/containers/toolbox/pull/1199
This commit is contained in:
Debarshi Ray 2022-12-13 19:40:40 +01:00
parent 0f43be73c6
commit 42e9501950

View file

@ -528,24 +528,22 @@ func mountBind(containerPath, source, flags string) error {
// If it's not, then redirectPath will still proceed with the linking in two // If it's not, then redirectPath will still proceed with the linking in two
// different ways depending whether target is an absolute or a relative link: // different ways depending whether target is an absolute or a relative link:
// //
// * absolute - target's destination will be prepended with /run/host, and // - absolute - target's destination will be prepended with /run/host, and
// containerPath will be linked to the resulting path. This is // containerPath will be linked to the resulting path. This is an attempt
// an attempt to unbreak things, but if it doesn't work then // to unbreak things, but if it doesn't work then it's the user's
// it's the user's responsibility to fix it up. // responsibility to fix it up.
// //
// This is meant to address the common case where // This is meant to address the common case where /etc/resolv.conf on the
// /etc/resolv.conf on the host (ie., /run/host/etc/resolv.conf // host (ie., /run/host/etc/resolv.conf inside the container) is an
// inside the container) is an absolute symbolic link to // absolute symbolic link to /run/systemd/resolve/stub-resolv.conf. The
// something like /run/systemd/resolve/stub-resolv.conf. The // container's /etc/resolv.conf will then get linked to
// container's /etc/resolv.conf will then get linked to // /run/host/run/systemd/resolved/resolv-stub.conf.
// /run/host/run/systemd/resolved/resolv-stub.conf.
// //
// This is why properly configured hosts should use relative // This is why properly configured hosts should use relative symbolic
// symbolic links, because they don't need to be adjusted in // links, because they don't need to be adjusted in such scenarios.
// such scenarios.
// //
// * relative - containerPath will be linked to the invalid target, and it's // - relative - containerPath will be linked to the invalid target, and it's
// the user's responsibility to fix it up. // the user's responsibility to fix it up.
// //
// folder signifies if the target is a folder // folder signifies if the target is a folder
func redirectPath(containerPath, target string, folder bool) error { func redirectPath(containerPath, target string, folder bool) error {