From 3de86133271ef2b533f1d10d992bbe23afa6e6f1 Mon Sep 17 00:00:00 2001 From: Kenta Tada Date: Sun, 19 Apr 2020 23:21:40 +0900 Subject: [PATCH] libcontainer: use consts of Namespace from runtime-spec Signed-off-by: Kenta Tada --- libcontainer/specconv/example.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/libcontainer/specconv/example.go b/libcontainer/specconv/example.go index 2d5e3791..8a201bc7 100644 --- a/libcontainer/specconv/example.go +++ b/libcontainer/specconv/example.go @@ -139,26 +139,26 @@ func Example() *specs.Spec { }, Namespaces: []specs.LinuxNamespace{ { - Type: "pid", + Type: specs.PIDNamespace, }, { - Type: "network", + Type: specs.NetworkNamespace, }, { - Type: "ipc", + Type: specs.IPCNamespace, }, { - Type: "uts", + Type: specs.UTSNamespace, }, { - Type: "mount", + Type: specs.MountNamespace, }, }, }, } if cgroups.IsCgroup2UnifiedMode() { spec.Linux.Namespaces = append(spec.Linux.Namespaces, specs.LinuxNamespace{ - Type: "cgroup", + Type: specs.CgroupNamespace, }) } return spec