loadPluginItems walks every sub-filesystem of every registered plugin FS, reading item YAML files from an "items/" prefix and merging them into dst.
(dst map[int]*ItemSpec)
| 35 | // loadPluginItems walks every sub-filesystem of every registered plugin FS, |
| 36 | // reading item YAML files from an "items/" prefix and merging them into dst. |
| 37 | func loadPluginItems(dst map[int]*ItemSpec) { |
| 38 | for _, groupFS := range pluginFileSystems { |
| 39 | for subFS := range groupFS.AllFileSubSystems { |
| 40 | loadItemsFromFS(subFS, dst) |
| 41 | } |
| 42 | } |
| 43 | } |
| 44 | |
| 45 | func loadItemsFromFS(subFS fs.ReadFileFS, dst map[int]*ItemSpec) { |
| 46 | // PluginFiles does not support directory traversal, so use KnownPaths |
no test coverage detected