aboutsummaryrefslogtreecommitdiffstats
path: root/modules/container/map.go
blob: 3519de09512e63a65b33a71322d3e46a8c621d1c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
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
}