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

Function cloneAssets

internal/discord/runtime.go:1396–1411  ·  view source on GitHub ↗
(input []model.Asset)

Source from the content-addressed store, hash-verified

1394}
1395
1396func cloneAssets(input []model.Asset) []model.Asset {
1397 output := make([]model.Asset, 0, len(input))
1398 for _, asset := range input {
1399 cloned := model.Asset{Link: asset.Link}
1400 if asset.Name != nil {
1401 name := *asset.Name
1402 cloned.Name = &name
1403 }
1404 if asset.Image != nil {
1405 image := *asset.Image
1406 cloned.Image = &image
1407 }
1408 output = append(output, cloned)
1409 }
1410 return output
1411}
1412
1413func cloneGuildConfigMap(input map[int64]*model.GuildConfig) []model.GuildConfig {
1414 output := make([]model.GuildConfig, 0, len(input))

Callers 5

loadSnapshotMethod · 0.85
snapshotForSaveMethod · 0.85
checkAndNotifyAssetsMethod · 0.85
guildDeliveryStateMethod · 0.85
userDeliveryStateMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected