MCPcopy
hub / github.com/google/go-jsonnet / ResolveImport

Method ResolveImport

vm.go:562–565  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

560// It will cache the contents of the file immediately as well, to avoid the possibility of the file
561// disappearing after being checked.
562func (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.

Callers 2

findDependenciesMethod · 0.95
getImportsFunction · 0.80

Calls 1

importDataMethod · 0.80

Tested by

no test coverage detected