MCPcopy
hub / github.com/hashicorp/hcl / DecodeUserFunctions

Function DecodeUserFunctions

ext/userfunc/public.go:43–45  ·  view source on GitHub ↗

DecodeUserFunctions looks for blocks of the given type in the given body and, for each one found, interprets it as a custom function definition. On success, the result is a mapping of function names to implementations, along with a new body that represents the remaining content of the given body wh

(body hcl.Body, blockType string, context ContextFunc)

Source from the content-addressed store, hash-verified

41// If the returned diagnostics set has errors then the function map and
42// remain body may be nil or incomplete.
43func DecodeUserFunctions(body hcl.Body, blockType string, context ContextFunc) (funcs map[string]function.Function, remain hcl.Body, diags hcl.Diagnostics) {
44 return decodeUserFunctions(body, blockType, context)
45}

Callers 1

decodeSpecDeclsFunction · 0.92

Calls 1

decodeUserFunctionsFunction · 0.85

Tested by

no test coverage detected