Add errors-on-non-Linux ToRootless implementation

`go test` complains about this tree because the package ends up with no
symbols on non-Linux platforms, e.g., Windows, even though this API is
never be called on non-Linux platforms, according to the compiler.

Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
v0.8
Paul "TBBle" Hampson 2020-07-28 02:39:03 +10:00
parent 5e3e18a72d
commit b5e6d54910
1 changed files with 19 additions and 0 deletions

View File

@ -0,0 +1,19 @@
// +build !linux
package specconv
import (
"runtime"
"github.com/opencontainers/runtime-spec/specs-go"
"github.com/pkg/errors"
)
// ToRootless converts spec to be compatible with "rootless" runc.
// * Remove /sys mount
// * Remove cgroups
//
// See docs/rootless.md for the supported runc revision.
func ToRootless(spec *specs.Spec) error {
return errors.Errorf("not implemented on on %s", runtime.GOOS)
}