tryExactMatch looks for exact path matches with common extensions. Extension list derived from the canonical scanner registry.
(path string, idx *fileIndex)
| 256 | // tryExactMatch looks for exact path matches with common extensions. |
| 257 | // Extension list derived from the canonical scanner registry. |
| 258 | func tryExactMatch(path string, idx *fileIndex) []string { |
| 259 | extensions := ResolverExtensions() |
| 260 | |
| 261 | for _, ext := range extensions { |
| 262 | candidate := path + ext |
| 263 | if files, ok := idx.byExact[candidate]; ok { |
| 264 | return files |
| 265 | } |
| 266 | } |
| 267 | |
| 268 | return nil |
| 269 | } |
| 270 | |
| 271 | // trySuffixMatch finds files where the path ends with the normalized import |
| 272 | func trySuffixMatch(normalized string, idx *fileIndex) []string { |
no test coverage detected