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

Method ImportAST

vm.go:579–581  ·  view source on GitHub ↗

ImportAST fetches the Jsonnet AST 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

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.
579func (vm *VM) ImportAST(importedFrom, importedPath string) (contents ast.Node, foundAt string, err error) {
580 return vm.importCache.importAST(importedFrom, importedPath)
581}
582
583// SnippetToAST parses a snippet and returns the resulting AST.
584func SnippetToAST(filename string, snippet string) (ast.Node, error) {

Callers 7

findDependenciesMethod · 0.95
EvaluateFileMethod · 0.95
EvaluateFileStreamMethod · 0.95
EvaluateFileMultiMethod · 0.95
FindDependenciesMethod · 0.95
lintFunction · 0.80
getImportsFunction · 0.80

Calls 1

importASTMethod · 0.80

Tested by

no test coverage detected