MCPcopy Create free account
hub / github.com/MMadmer/EpicAssetsNotifyBot / cloneUserProfileMap

Function cloneUserProfileMap

internal/discord/runtime.go:1439–1455  ·  view source on GitHub ↗
(input map[int64]*model.UserProfile)

Source from the content-addressed store, hash-verified

1437}
1438
1439func cloneUserProfileMap(input map[int64]*model.UserProfile) []model.UserProfile {
1440 output := make([]model.UserProfile, 0, len(input))
1441 for _, profile := range input {
1442 output = append(output, *profile)
1443 }
1444 slices.SortFunc(output, func(left, right model.UserProfile) int {
1445 switch {
1446 case left.ID < right.ID:
1447 return -1
1448 case left.ID > right.ID:
1449 return 1
1450 default:
1451 return 0
1452 }
1453 })
1454 return output
1455}
1456
1457func cloneInt64Ptr(value *int64) *int64 {
1458 if value == nil {

Callers 1

snapshotForSaveMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected