Find finds and returns the the first component with provided bundle key
(key string)
| 256 | |
| 257 | // Find finds and returns the the first component with provided bundle key |
| 258 | func (m PackComponentFileMap) FindBundleKey(key string) PackComponent { |
| 259 | for _, c := range m { |
| 260 | if c.BundleKey() == key { |
| 261 | return c |
| 262 | } |
| 263 | } |
| 264 | |
| 265 | return nil |
| 266 | } |
| 267 | |
| 268 | func (m PackComponentFileMap) Set(component PackComponent) { |
| 269 | m[parsePath(component.OriginalFilePath())] = component |