diff --git a/helpers_windows_test.go b/helpers_windows_test.go index 3ad33f8f88e0..a3b4768f64aa 100644 --- a/helpers_windows_test.go +++ b/helpers_windows_test.go @@ -7,28 +7,29 @@ import ( "strconv" "github.com/containerd/containerd/containers" + "github.com/containerd/containerd/oci" specs "github.com/opencontainers/runtime-spec/specs-go" ) const newLine = "\r\n" -func withExitStatus(es int) SpecOpts { - return func(_ context.Context, _ *Client, _ *containers.Container, s *specs.Spec) error { +func withExitStatus(es int) oci.SpecOpts { + return func(_ context.Context, _ oci.Client, _ *containers.Container, s *specs.Spec) error { s.Process.Args = []string{"powershell", "-noprofile", "exit", strconv.Itoa(es)} return nil } } -func withProcessArgs(args ...string) SpecOpts { - return WithProcessArgs(append([]string{"powershell", "-noprofile"}, args...)...) +func withProcessArgs(args ...string) oci.SpecOpts { + return oci.WithProcessArgs(append([]string{"powershell", "-noprofile"}, args...)...) } -func withCat() SpecOpts { - return WithProcessArgs("cmd", "/c", "more") +func withCat() oci.SpecOpts { + return oci.WithProcessArgs("cmd", "/c", "more") } -func withTrue() SpecOpts { - return WithProcessArgs("cmd", "/c") +func withTrue() oci.SpecOpts { + return oci.WithProcessArgs("cmd", "/c") } func withExecExitStatus(s *specs.Process, es int) { @@ -39,8 +40,8 @@ func withExecArgs(s *specs.Process, args ...string) { s.Args = append([]string{"powershell", "-noprofile"}, args...) } -func withImageConfig(i Image) SpecOpts { - return func(_ context.Context, _ *Client, _ *containers.Container, s *specs.Spec) error { +func withImageConfig(i Image) oci.SpecOpts { + return func(_ context.Context, _ oci.Client, _ *containers.Container, s *specs.Spec) error { s.Windows.LayerFolders = dockerLayerFolders return nil } diff --git a/oci/spec_opts_windows.go b/oci/spec_opts_windows.go index 72b527e10d62..5d43bca645c2 100644 --- a/oci/spec_opts_windows.go +++ b/oci/spec_opts_windows.go @@ -10,7 +10,6 @@ import ( "github.com/containerd/containerd/containers" "github.com/containerd/containerd/content" "github.com/containerd/containerd/images" - "github.com/containerd/containerd/platforms" "github.com/opencontainers/image-spec/specs-go/v1" specs "github.com/opencontainers/runtime-spec/specs-go" ) diff --git a/task_opts_windows.go b/task_opts_windows.go index 425fcc723cf2..d77402c67536 100644 --- a/task_opts_windows.go +++ b/task_opts_windows.go @@ -8,7 +8,7 @@ import ( // WithResources sets the provided resources on the spec for task updates func WithResources(resources *specs.WindowsResources) UpdateTaskOpts { - return func(ctx context.Context, client Client, r *UpdateTaskInfo) error { + return func(ctx context.Context, client *Client, r *UpdateTaskInfo) error { r.Resources = resources return nil }