mirror of
https://github.com/safing/portbase
synced 2025-09-01 10:09:50 +00:00
15 lines
324 B
Go
15 lines
324 B
Go
package updater
|
|
|
|
// Export exports the list of resources. All resources must be locked when accessed.
|
|
func (reg *ResourceRegistry) Export() map[string]*Resource {
|
|
reg.RLock()
|
|
defer reg.RUnlock()
|
|
|
|
// copy the map
|
|
new := make(map[string]*Resource)
|
|
for key, val := range reg.resources {
|
|
new[key] = val
|
|
}
|
|
|
|
return new
|
|
}
|