go fmt
This commit is contained in:
parent
8273565255
commit
4bd7db0759
|
@ -5,7 +5,7 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
type artifact struct{
|
type artifact struct {
|
||||||
// A map of regions to AMI IDs.
|
// A map of regions to AMI IDs.
|
||||||
amis map[string]string
|
amis map[string]string
|
||||||
}
|
}
|
||||||
|
|
|
@ -57,7 +57,7 @@ func ParseTemplate(data []byte) (t *Template, err error) {
|
||||||
for i, v := range rawTpl.Builders {
|
for i, v := range rawTpl.Builders {
|
||||||
rawType, ok := v["type"]
|
rawType, ok := v["type"]
|
||||||
if !ok {
|
if !ok {
|
||||||
errors = append(errors, fmt.Errorf("builder %d: missing 'type'", i + 1))
|
errors = append(errors, fmt.Errorf("builder %d: missing 'type'", i+1))
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -72,13 +72,13 @@ func ParseTemplate(data []byte) (t *Template, err error) {
|
||||||
// Attempt to convert the name/type to strings, but error if we can't
|
// Attempt to convert the name/type to strings, but error if we can't
|
||||||
name, ok := rawName.(string)
|
name, ok := rawName.(string)
|
||||||
if !ok {
|
if !ok {
|
||||||
errors = append(errors, fmt.Errorf("builder %d: name must be a string", i + 1))
|
errors = append(errors, fmt.Errorf("builder %d: name must be a string", i+1))
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
typeName, ok := rawType.(string)
|
typeName, ok := rawType.(string)
|
||||||
if !ok {
|
if !ok {
|
||||||
errors = append(errors, fmt.Errorf("builder %d: type must be a string", i + 1))
|
errors = append(errors, fmt.Errorf("builder %d: type must be a string", i+1))
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue