Help us shape the future of Go! Take the 2026 Go Developer Survey

partial

package
v0.11.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 9, 2023 License: MPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Eval

func Eval(ctx *hcl.EvalContext, code string) (cty.Value, string, error)

Eval parses code as HCL and then performs a perform evaluation on the result. If the result could be fully evaluated, the value is returned. Otherwise a string with the partial evaluated results is returned.

func EvalExpression

func EvalExpression(ctx *hcl.EvalContext, expr hcl.Expression) (string, error)

EvalExpression takes an existing expression and partial evaluates it, returning a string which can be used as the value of the expression. If the expression is fully evaluated, the literal is converted back into a string and returned. If the result is still an HCL construct, it is rendered out and returned. One cavaet that a toplevel TemplateExpr will be rendered without surounding quotes when returned.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL