From 16320372d64adacf1c172af0535fe56114d3b611 Mon Sep 17 00:00:00 2001
From: Mark Peek <mark@peek.org>
Date: Fri, 12 Jun 2015 14:02:09 -0700
Subject: [PATCH] Make some builder config usage more consistent with other
 builders

---
 builder/digitalocean/config.go   | 6 +++---
 builder/docker/config.go         | 6 +++---
 builder/virtualbox/ovf/config.go | 6 +++---
 3 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/builder/digitalocean/config.go b/builder/digitalocean/config.go
index a19dabda..178b5404 100644
--- a/builder/digitalocean/config.go
+++ b/builder/digitalocean/config.go
@@ -42,10 +42,10 @@ type Config struct {
 }
 
 func NewConfig(raws ...interface{}) (*Config, []string, error) {
-	var c Config
+	c := new(Config)
 
 	var md mapstructure.Metadata
-	err := config.Decode(&c, &config.DecodeOpts{
+	err := config.Decode(c, &config.DecodeOpts{
 		Metadata:    &md,
 		Interpolate: true,
 		InterpolateFilter: &interpolate.RenderFilter{
@@ -142,5 +142,5 @@ func NewConfig(raws ...interface{}) (*Config, []string, error) {
 	}
 
 	common.ScrubConfig(c, c.APIToken)
-	return &c, nil, nil
+	return c, nil, nil
 }
diff --git a/builder/docker/config.go b/builder/docker/config.go
index 024b915a..d5801c8b 100644
--- a/builder/docker/config.go
+++ b/builder/docker/config.go
@@ -31,10 +31,10 @@ type Config struct {
 }
 
 func NewConfig(raws ...interface{}) (*Config, []string, error) {
-	var c Config
+	c := new(Config)
 
 	var md mapstructure.Metadata
-	err := config.Decode(&c, &config.DecodeOpts{
+	err := config.Decode(c, &config.DecodeOpts{
 		Metadata:    &md,
 		Interpolate: true,
 		InterpolateFilter: &interpolate.RenderFilter{
@@ -91,5 +91,5 @@ func NewConfig(raws ...interface{}) (*Config, []string, error) {
 		return nil, nil, errs
 	}
 
-	return &c, nil, nil
+	return c, nil, nil
 }
diff --git a/builder/virtualbox/ovf/config.go b/builder/virtualbox/ovf/config.go
index de60bcc7..837c3f37 100644
--- a/builder/virtualbox/ovf/config.go
+++ b/builder/virtualbox/ovf/config.go
@@ -40,8 +40,8 @@ type Config struct {
 }
 
 func NewConfig(raws ...interface{}) (*Config, []string, error) {
-	var c Config
-	err := config.Decode(&c, &config.DecodeOpts{
+	c := new(Config)
+	err := config.Decode(c, &config.DecodeOpts{
 		Interpolate: true,
 		InterpolateFilter: &interpolate.RenderFilter{
 			Exclude: []string{
@@ -132,5 +132,5 @@ func NewConfig(raws ...interface{}) (*Config, []string, error) {
 		c.ImportFlags = append(c.ImportFlags, "--options", c.ImportOpts)
 	}
 
-	return &c, warnings, nil
+	return c, warnings, nil
 }
-- 
2.30.9