MCPcopy Create free account
hub / github.com/TheThingsNetwork/lorawan-stack / Cleanup

Method Cleanup

pkg/i18n/i18n.go:276–284  ·  view source on GitHub ↗

Cleanup removes unused message descriptors.

()

Source from the content-addressed store, hash-verified

274
275// Cleanup removes unused message descriptors.
276func (m MessageDescriptorMap) Cleanup() (deleted []string) {
277 for id, descriptor := range m {
278 if !descriptor.Touched() {
279 delete(m, id)
280 deleted = append(deleted, id)
281 }
282 }
283 return
284}
285
286// CloneGlobal returns a shallow clone of the global message descriptor registry.
287func CloneGlobal() MessageDescriptorMap {

Callers 15

mainFunction · 0.80
TestBatchOperationsFunction · 0.80
TestUpstreamFunction · 0.80
TestTTJSFunction · 0.80
TestBatchOperationsFunction · 0.80
TestI18NFunction · 0.80
TestServerFunction · 0.80

Calls 1

TouchedMethod · 0.80

Tested by 15

TestBatchOperationsFunction · 0.64
TestUpstreamFunction · 0.64
TestTTJSFunction · 0.64
TestBatchOperationsFunction · 0.64
TestI18NFunction · 0.64
TestServerFunction · 0.64