From fa3b54c0c4c6a2a97d1ee4647350487e99bb7c90 Mon Sep 17 00:00:00 2001 From: Pam Selle <204372+pselle@users.noreply.github.com> Date: Mon, 2 Mar 2020 15:54:50 -0500 Subject: [PATCH] Move type construction out, delete func --- config/raw_config.go | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/config/raw_config.go b/config/raw_config.go index db99f17ac..677ccce2b 100644 --- a/config/raw_config.go +++ b/config/raw_config.go @@ -162,7 +162,11 @@ func (r *RawConfig) Interpolate(vs map[string]ast.Variable) error { r.lock.Lock() defer r.lock.Unlock() - config := langEvalConfig(vs) + config := &hil.EvalConfig{ + GlobalScope: &ast.BasicScope{ + VarMap: vs, + }, + } return r.interpolate(func(root ast.Node) (interface{}, error) { // None of the variables we need are computed, meaning we should // be able to properly evaluate. @@ -399,12 +403,3 @@ type gobRawConfig struct { Key string Raw map[string]interface{} } - -// langEvalConfig returns the evaluation configuration we use to execute. -func langEvalConfig(vs map[string]ast.Variable) *hil.EvalConfig { - return &hil.EvalConfig{ - GlobalScope: &ast.BasicScope{ - VarMap: vs, - }, - } -}