blueprint: rename package variable for readability
This commit is contained in:
parent
fb8634a991
commit
42da3cb143
1 changed files with 4 additions and 4 deletions
|
|
@ -101,13 +101,13 @@ func (b *Blueprint) Initialize() error {
|
|||
return fmt.Errorf("Error hashing passwords: %s", err.Error())
|
||||
}
|
||||
|
||||
for i, p := range b.Packages {
|
||||
if len(p.Name) == 0 {
|
||||
for i, pkg := range b.Packages {
|
||||
if pkg.Name == "" {
|
||||
var errMsg string
|
||||
if len(p.Version) == 0 {
|
||||
if pkg.Version == "" {
|
||||
errMsg = fmt.Sprintf("Entry #%d has no name.", i+1)
|
||||
} else {
|
||||
errMsg = fmt.Sprintf("Entry #%d has version '%v' but no name.", i+1, p.Version)
|
||||
errMsg = fmt.Sprintf("Entry #%d has version '%v' but no name.", i+1, pkg.Version)
|
||||
}
|
||||
return fmt.Errorf("All package entries need to contain the name of the package. %s", errMsg)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue