Merge pull request #2222 from markpeek/markpeek-fix-config-interpolation

Fix config interpolation for some builders
This commit is contained in:
Chris Bednarski 2015-06-12 14:19:36 -07:00
commit 65863342dc
6 changed files with 12 additions and 12 deletions

View File

@ -42,10 +42,10 @@ type Config struct {
} }
func NewConfig(raws ...interface{}) (*Config, []string, error) { func NewConfig(raws ...interface{}) (*Config, []string, error) {
var c Config c := new(Config)
var md mapstructure.Metadata var md mapstructure.Metadata
err := config.Decode(&c, &config.DecodeOpts{ err := config.Decode(c, &config.DecodeOpts{
Metadata: &md, Metadata: &md,
Interpolate: true, Interpolate: true,
InterpolateFilter: &interpolate.RenderFilter{ InterpolateFilter: &interpolate.RenderFilter{
@ -142,5 +142,5 @@ func NewConfig(raws ...interface{}) (*Config, []string, error) {
} }
common.ScrubConfig(c, c.APIToken) common.ScrubConfig(c, c.APIToken)
return &c, nil, nil return c, nil, nil
} }

View File

@ -31,10 +31,10 @@ type Config struct {
} }
func NewConfig(raws ...interface{}) (*Config, []string, error) { func NewConfig(raws ...interface{}) (*Config, []string, error) {
var c Config c := new(Config)
var md mapstructure.Metadata var md mapstructure.Metadata
err := config.Decode(&c, &config.DecodeOpts{ err := config.Decode(c, &config.DecodeOpts{
Metadata: &md, Metadata: &md,
Interpolate: true, Interpolate: true,
InterpolateFilter: &interpolate.RenderFilter{ InterpolateFilter: &interpolate.RenderFilter{
@ -91,5 +91,5 @@ func NewConfig(raws ...interface{}) (*Config, []string, error) {
return nil, nil, errs return nil, nil, errs
} }
return &c, nil, nil return c, nil, nil
} }

View File

@ -47,7 +47,7 @@ type Config struct {
func NewConfig(raws ...interface{}) (*Config, []string, error) { func NewConfig(raws ...interface{}) (*Config, []string, error) {
c := new(Config) c := new(Config)
err := config.Decode(&c, &config.DecodeOpts{ err := config.Decode(c, &config.DecodeOpts{
Interpolate: true, Interpolate: true,
InterpolateFilter: &interpolate.RenderFilter{ InterpolateFilter: &interpolate.RenderFilter{
Exclude: []string{ Exclude: []string{

View File

@ -21,7 +21,7 @@ type Config struct {
func NewConfig(raws ...interface{}) (*Config, []string, error) { func NewConfig(raws ...interface{}) (*Config, []string, error) {
c := new(Config) c := new(Config)
err := config.Decode(&c, &config.DecodeOpts{ err := config.Decode(c, &config.DecodeOpts{
Interpolate: true, Interpolate: true,
InterpolateFilter: &interpolate.RenderFilter{ InterpolateFilter: &interpolate.RenderFilter{
Exclude: []string{ Exclude: []string{

View File

@ -33,7 +33,7 @@ type Config struct {
func NewConfig(raws ...interface{}) (*Config, []string, error) { func NewConfig(raws ...interface{}) (*Config, []string, error) {
c := new(Config) c := new(Config)
err := config.Decode(&c, &config.DecodeOpts{ err := config.Decode(c, &config.DecodeOpts{
Interpolate: true, Interpolate: true,
InterpolateFilter: &interpolate.RenderFilter{ InterpolateFilter: &interpolate.RenderFilter{
Exclude: []string{ Exclude: []string{

View File

@ -40,8 +40,8 @@ type Config struct {
} }
func NewConfig(raws ...interface{}) (*Config, []string, error) { func NewConfig(raws ...interface{}) (*Config, []string, error) {
var c Config c := new(Config)
err := config.Decode(&c, &config.DecodeOpts{ err := config.Decode(c, &config.DecodeOpts{
Interpolate: true, Interpolate: true,
InterpolateFilter: &interpolate.RenderFilter{ InterpolateFilter: &interpolate.RenderFilter{
Exclude: []string{ Exclude: []string{
@ -132,5 +132,5 @@ func NewConfig(raws ...interface{}) (*Config, []string, error) {
c.ImportFlags = append(c.ImportFlags, "--options", c.ImportOpts) c.ImportFlags = append(c.ImportFlags, "--options", c.ImportOpts)
} }
return &c, warnings, nil return c, warnings, nil
} }