Better varibable naming.
This commit is contained in:
parent
ee430d9a40
commit
37b3305301
|
@ -111,7 +111,7 @@ func (p *PostProcessor) Configure(raws ...interface{}) error {
|
||||||
errs, fmt.Errorf("Error parsing space_object_name template: %s", err))
|
errs, fmt.Errorf("Error parsing space_object_name template: %s", err))
|
||||||
}
|
}
|
||||||
|
|
||||||
templates := map[string]*string{
|
requiredArgs := map[string]*string{
|
||||||
"api_token": &p.config.APIToken,
|
"api_token": &p.config.APIToken,
|
||||||
"spaces_key": &p.config.SpacesKey,
|
"spaces_key": &p.config.SpacesKey,
|
||||||
"spaces_secret": &p.config.SpacesSecret,
|
"spaces_secret": &p.config.SpacesSecret,
|
||||||
|
@ -120,7 +120,7 @@ func (p *PostProcessor) Configure(raws ...interface{}) error {
|
||||||
"image_name": &p.config.Name,
|
"image_name": &p.config.Name,
|
||||||
"image_regions": &p.config.ImageRegions[0],
|
"image_regions": &p.config.ImageRegions[0],
|
||||||
}
|
}
|
||||||
for key, ptr := range templates {
|
for key, ptr := range requiredArgs {
|
||||||
if *ptr == "" {
|
if *ptr == "" {
|
||||||
errs = packer.MultiErrorAppend(
|
errs = packer.MultiErrorAppend(
|
||||||
errs, fmt.Errorf("%s must be set", key))
|
errs, fmt.Errorf("%s must be set", key))
|
||||||
|
|
Loading…
Reference in New Issue