You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
507 B

7 years ago
  1. // Copyright 2017 The Gitea Authors. All rights reserved.
  2. // Use of this source code is governed by a MIT-style
  3. // license that can be found in the LICENSE file.
  4. package models
  5. func keysInt64(m map[int64]struct{}) []int64 {
  6. var keys = make([]int64, 0, len(m))
  7. for k := range m {
  8. keys = append(keys, k)
  9. }
  10. return keys
  11. }
  12. func valuesRepository(m map[int64]*Repository) []*Repository {
  13. var values = make([]*Repository, 0, len(m))
  14. for _, v := range m {
  15. values = append(values, v)
  16. }
  17. return values
  18. }