fix(build): Go 1.23 maps.Values slices.Collect #371
@@ -13,6 +13,7 @@ import (
|
||||
"code.mokoconsulting.tech/MokoConsulting/MokoGitea/models/unit"
|
||||
user_model "code.mokoconsulting.tech/MokoConsulting/MokoGitea/models/user"
|
||||
"maps"
|
||||
"slices"
|
||||
|
||||
"code.mokoconsulting.tech/MokoConsulting/MokoGitea/modules/container"
|
||||
"code.mokoconsulting.tech/MokoConsulting/MokoGitea/modules/optional"
|
||||
@@ -47,12 +48,12 @@ func (repos RepositoryList) Swap(i, j int) {
|
||||
|
||||
// ValuesRepository converts a repository map to a list
|
||||
func ValuesRepository(m map[int64]*Repository) []*Repository {
|
||||
return maps.Values(m)
|
||||
return slices.Collect(maps.Values(m))
|
||||
}
|
||||
|
||||
// RepositoryListOfMap make list from values of map
|
||||
func RepositoryListOfMap(repoMap map[int64]*Repository) RepositoryList {
|
||||
return RepositoryList(maps.Values(repoMap))
|
||||
return RepositoryList(slices.Collect(maps.Values(repoMap)))
|
||||
}
|
||||
|
||||
func (repos RepositoryList) LoadUnits(ctx context.Context) error {
|
||||
|
||||
Reference in New Issue
Block a user