From ef5acfab4f827e27a0fc249e3d9b3f1824a5f5d3 Mon Sep 17 00:00:00 2001 From: Kir Kolyshkin Date: Fri, 28 Mar 2025 18:50:00 -0700 Subject: [PATCH] libct/configs: use slices.Delete Signed-off-by: Kir Kolyshkin --- libcontainer/configs/namespaces_linux.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libcontainer/configs/namespaces_linux.go b/libcontainer/configs/namespaces_linux.go index 5740fb794..f95090046 100644 --- a/libcontainer/configs/namespaces_linux.go +++ b/libcontainer/configs/namespaces_linux.go @@ -3,6 +3,7 @@ package configs import ( "fmt" "os" + "slices" "sync" ) @@ -98,7 +99,7 @@ func (n *Namespaces) Remove(t NamespaceType) bool { if i == -1 { return false } - *n = append((*n)[:i], (*n)[i+1:]...) + *n = slices.Delete((*n), i, i+1) return true }