github.com/gitbundle/modules@v0.0.0-20231025071548-85b91c5c3b01/container/map.go (about) 1 // Copyright 2023 The GitBundle Inc. All rights reserved. 2 // Copyright 2017 The Gitea Authors. All rights reserved. 3 // Use of this source code is governed by a MIT-style 4 // license that can be found in the LICENSE file. 5 6 package container 7 8 // KeysInt64 returns keys slice for a map with int64 key 9 func KeysInt64(m map[int64]struct{}) []int64 { 10 keys := make([]int64, 0, len(m)) 11 for k := range m { 12 keys = append(keys, k) 13 } 14 return keys 15 }