blueprint: improve error message on missing name
the error should not infer that a version is mandatory. Also the error message is now explicitly checked
This commit is contained in:
parent
e31ec13c87
commit
fb8634a991
2 changed files with 16 additions and 11 deletions
|
|
@ -105,7 +105,7 @@ func (b *Blueprint) Initialize() error {
|
|||
if len(p.Name) == 0 {
|
||||
var errMsg string
|
||||
if len(p.Version) == 0 {
|
||||
errMsg = fmt.Sprintf("Entry #%d has neither version nor name.", i+1)
|
||||
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)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue