diff options
Diffstat (limited to 'modules/container/map.go')
-rw-r--r-- | modules/container/map.go | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/modules/container/map.go b/modules/container/map.go new file mode 100644 index 0000000000..3519de0951 --- /dev/null +++ b/modules/container/map.go @@ -0,0 +1,14 @@ +// Copyright 2022 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package container + +// KeysInt64 returns keys slice for a map with int64 key +func KeysInt64(m map[int64]struct{}) []int64 { + keys := make([]int64, 0, len(m)) + for k := range m { + keys = append(keys, k) + } + return keys +} |