This should only be used by Modules and FileInfos.
(ctx context.Context, filePath string)
| 360 | |
| 361 | // This should only be used by Modules and FileInfos. |
| 362 | func (m *moduleSet) getModuleForFilePath(ctx context.Context, filePath string) (Module, error) { |
| 363 | return m.filePathToModuleCache.GetOrAdd( |
| 364 | filePath, |
| 365 | func() (Module, error) { |
| 366 | return m.getModuleForFilePathUncached(ctx, filePath) |
| 367 | }, |
| 368 | ) |
| 369 | } |
| 370 | |
| 371 | func (m *moduleSet) getModuleForFilePathUncached(ctx context.Context, filePath string) (_ Module, retErr error) { |
| 372 | matchingOpaqueIDToModule := make(map[string]Module) |
nothing calls this directly
no test coverage detected