MCPcopy Create free account
hub / github.com/LagrangeDev/LagrangeGo / rangeCacheOf

Function rangeCacheOf

client/internal/cache/base.go:100–112  ·  view source on GitHub ↗
(c *Cache, iter func(k K, v *T) bool)

Source from the content-addressed store, hash-verified

98}
99
100func rangeCacheOf[T any, K keyType](c *Cache, iter func(k K, v *T) bool) {
101 typ := cacheTypesMap[typenameof[T]()]
102 if typ == 0 {
103 return
104 }
105 key := uint64(typ) << 32
106 c.m.Range(func(k uint64, v unsafe.Pointer) bool {
107 if k&key != 0 {
108 return iter(K(uint32(k)), (*T)(v))
109 }
110 return true
111 })
112}

Callers 5

GetUinMethod · 0.85
GetAllFriendsMethod · 0.85
GetAllGroupsInfoMethod · 0.85
GetGroupMembersMethod · 0.85
GetAllRkeyInfoMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected