From f1cef0baaee6a572831e9f6e61a983f32126ed2a Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Sat, 13 Jun 2015 14:07:43 -0400 Subject: [PATCH] builder/null: fix config parsing --- builder/null/config.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/builder/null/config.go b/builder/null/config.go index 9ccc32282..aa3f15120 100644 --- a/builder/null/config.go +++ b/builder/null/config.go @@ -2,6 +2,7 @@ package null import ( "fmt" + "github.com/mitchellh/packer/common" "github.com/mitchellh/packer/helper/config" "github.com/mitchellh/packer/packer" @@ -19,9 +20,9 @@ type Config struct { } func NewConfig(raws ...interface{}) (*Config, []string, error) { - c := new(Config) + var c Config - err := config.Decode(c, &config.DecodeOpts{ + err := config.Decode(&c, &config.DecodeOpts{ Interpolate: true, InterpolateFilter: &interpolate.RenderFilter{ Exclude: []string{ @@ -62,5 +63,5 @@ func NewConfig(raws ...interface{}) (*Config, []string, error) { return nil, nil, errs } - return c, nil, nil + return &c, nil, nil }