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

Function prepareExtVars

interpreter.go:1254–1268  ·  view source on GitHub ↗
(i *interpreter, ext vmExtMap, kind string)

Source from the content-addressed store, hash-verified

1252}
1253
1254func prepareExtVars(i *interpreter, ext vmExtMap, kind string) map[string]*cachedThunk {
1255 result := make(map[string]*cachedThunk)
1256 for name, content := range ext {
1257 diagnosticFile := "<" + kind + ":" + name + ">"
1258 switch content.kind {
1259 case extKindCode:
1260 result[name] = codeToPV(i, diagnosticFile, content.value)
1261 case extKindNode:
1262 result[name] = nodeToPV(i, diagnosticFile, content.node)
1263 default:
1264 result[name] = readyThunk(makeValueString(content.value))
1265 }
1266 }
1267 return result
1268}
1269
1270func buildObject(hide ast.ObjectFieldHide, fields map[string]value) *valueObject {
1271 fieldMap := simpleObjectFieldMap{}

Callers 2

buildInterpreterFunction · 0.85
evaluateAuxFunction · 0.85

Calls 4

codeToPVFunction · 0.85
nodeToPVFunction · 0.85
readyThunkFunction · 0.85
makeValueStringFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…