Skip to content

Commit 3019e84

Browse files
committed
libct/cg: use clear built-in
As we no longer support Go < 1.21. Signed-off-by: Kir Kolyshkin <[email protected]>
1 parent b7fdd52 commit 3019e84

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

libcontainer/cgroups/utils.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -275,9 +275,7 @@ func RemovePaths(paths map[string]string) (err error) {
275275
}
276276
}
277277
if len(paths) == 0 {
278-
//nolint:ineffassign,staticcheck // done to help garbage collecting: opencontainers/runc#2506
279-
// TODO: switch to clear once Go < 1.21 is not supported.
280-
paths = make(map[string]string)
278+
clear(paths)
281279
return nil
282280
}
283281
return fmt.Errorf("Failed to remove paths: %v", paths)

0 commit comments

Comments
 (0)