Merge pull request #3564 from tiborvass/move-cgroups-dep-to-namespaces-pkg

runtime/opts: move WithNamespaceCgroupDeletion from containerd to its own package
This commit is contained in:
Derek McGowan 2019-09-03 10:38:53 -07:00 committed by GitHub
commit b039c39186
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View File

@ -17,15 +17,15 @@
package namespaces package namespaces
import ( import (
"github.com/containerd/containerd"
"github.com/containerd/containerd/namespaces" "github.com/containerd/containerd/namespaces"
"github.com/containerd/containerd/runtime/opts"
"github.com/urfave/cli" "github.com/urfave/cli"
) )
func deleteOpts(context *cli.Context) []namespaces.DeleteOpts { func deleteOpts(context *cli.Context) []namespaces.DeleteOpts {
var opts []namespaces.DeleteOpts var delOpts []namespaces.DeleteOpts
if context.Bool("cgroup") { if context.Bool("cgroup") {
opts = append(opts, containerd.WithNamespaceCgroupDeletion) delOpts = append(delOpts, opts.WithNamespaceCgroupDeletion)
} }
return opts return delOpts
} }

View File

@ -14,7 +14,7 @@
limitations under the License. limitations under the License.
*/ */
package containerd package opts
import ( import (
"context" "context"