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

Method ImportData

vm.go:569–575  ·  view source on GitHub ↗

ImportData fetches the data just as if it was imported from a Jsonnet file located at `importedFrom`. It shares the cache with the actual evaluation.

(importedFrom, importedPath string)

Source from the content-addressed store, hash-verified

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.
569func (vm *VM) ImportData(importedFrom, importedPath string) (contents string, foundAt string, err error) {
570 c, foundAt, err := vm.importCache.importData(importedFrom, importedPath)
571 if err != nil {
572 return "", foundAt, err
573 }
574 return c.String(), foundAt, err
575}
576
577// ImportAST fetches the Jsonnet AST just as if it was imported from a Jsonnet file located at `importedFrom`.
578// It shares the cache with the actual evaluation.

Callers

nothing calls this directly

Calls 2

importDataMethod · 0.80
StringMethod · 0.45

Tested by

no test coverage detected