mirror of
https://github.com/safing/portbase
synced 2025-04-19 08:59:09 +00:00
15 lines
325 B
Go
15 lines
325 B
Go
package updater
|
|
|
|
// Export exports the list of resources.
|
|
func (reg *ResourceRegistry) Export() map[string]*Resource {
|
|
reg.RLock()
|
|
defer reg.RUnlock()
|
|
|
|
// copy the map
|
|
copiedResources := make(map[string]*Resource)
|
|
for key, val := range reg.resources {
|
|
copiedResources[key] = val.Export()
|
|
}
|
|
|
|
return copiedResources
|
|
}
|