From 42da3cb143f03a9e645bf95de8d710c9e39714c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20Sch=C3=BCller?= Date: Tue, 20 Feb 2024 16:59:46 +0100 Subject: [PATCH] blueprint: rename package variable for readability --- internal/blueprint/blueprint.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/internal/blueprint/blueprint.go b/internal/blueprint/blueprint.go index 836f734ab..a5e0bdb10 100644 --- a/internal/blueprint/blueprint.go +++ b/internal/blueprint/blueprint.go @@ -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) }