func (e *Eval) Render(snippet string) string {
	w := strings.Builder{}
	for name, v := range e.Vars {
		v.Render(&w, name)
	}
	bind := bindVar(e.Bind)
	Var{Type: CodeVar}.Render(&w, "_")
	Var{Type: CodeVar}.Render(&w, bind)
	w.WriteString(snippet)
	return w.String()
}
Render renders a snippet binding local variables
package ycat
import (
	"io/ioutil"
	"os"
	"path"
	"strings"
	jsonnet "github.com/google/go-jsonnet"
)
type Eval struct {
	Bind         string
	MaxStackSize int
	Array        bool
	Vars         map[string]Var
	vm           *jsonnet.VM
}
type VarType uint
const (
	_ VarType = iota
	FileVar
	CodeVar
	RawVar
)
type Var struct {
	Type  VarType
	Value string
}
func (e *Eval) AddVar(typ VarType, name, value string) {
	if e.Vars == nil {
		e.Vars = make(map[string]Var)
	}
	e.Vars[name] = Var{typ, value}
}
func (v Var) Render(w *strings.Builder, name string) {
	w.WriteString("local ")
	w.WriteString(name)
	w.WriteString(" = ")
	switch v.Type {
	case FileVar:
		switch path.Ext(v.Value) {
		case ".json", ".libsonnet", ".jsonnet":
			w.WriteString(`import "`)
		case ".yaml", ".yml":
			w.WriteString(`importyaml "`)
		default:
			w.WriteString(`importstr "`)
		}
		w.WriteString(v.Value)
		w.WriteString("\";\n")
	default:
		w.WriteString(`std.extVar("`)
		w.WriteString(name)
		w.WriteString("\");\n")
	}
}