ResolveImport finds the actual path where the imported file can be found. It will cache the contents of the file immediately as well, to avoid the possibility of the file disappearing after being checked.
(importedFrom, importedPath string)
| 560 | // It will cache the contents of the file immediately as well, to avoid the possibility of the file |
| 561 | // disappearing after being checked. |
| 562 | func (vm *VM) ResolveImport(importedFrom, importedPath string) (foundAt string, err error) { |
| 563 | _, foundAt, err = vm.importCache.importData(importedFrom, importedPath) |
| 564 | return |
| 565 | } |
| 566 | |
| 567 | // ImportData fetches the data just as if it was imported from a Jsonnet file located at `importedFrom`. |
| 568 | // It shares the cache with the actual evaluation. |
no test coverage detected