Make some builder config usage more consistent with other builders
This commit is contained in:
parent
f398352996
commit
16320372d6
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue