use fmt pkg for Errorf calls in resolver.go

Signed-off-by: James Sheppard <jgsheppa@protonmail.com>
pull/12063/head
James Sheppard 2 years ago
parent caf4a63aa4
commit 288e0433db

@ -130,7 +130,7 @@ func (r *Resolver) Resolve(reqs []*chart.Dependency, repoNames map[string]string
vs, ok = repoIndex.Entries[d.Name] vs, ok = repoIndex.Entries[d.Name]
if !ok { if !ok {
return nil, errors.Errorf("%s chart not found in repo %s", d.Name, d.Repository) return nil, fmt.Errorf("%s chart not found in repo %s", d.Name, d.Repository)
} }
found = false found = false
} else { } else {
@ -193,7 +193,7 @@ func (r *Resolver) Resolve(reqs []*chart.Dependency, repoNames map[string]string
} }
} }
if len(missing) > 0 { if len(missing) > 0 {
return nil, errors.Errorf("can't get a valid version for repositories %s. Try changing the version constraint in Chart.yaml", strings.Join(missing, ", ")) return nil, fmt.Errorf("can't get a valid version for repositories %s. Try changing the version constraint in Chart.yaml", strings.Join(missing, ", "))
} }
digest, err := HashReq(reqs, locked) digest, err := HashReq(reqs, locked)
@ -254,7 +254,7 @@ func GetLocalPath(repo, chartpath string) (string, error) {
} }
if _, err = os.Stat(depPath); os.IsNotExist(err) { if _, err = os.Stat(depPath); os.IsNotExist(err) {
return "", errors.Errorf("directory %s not found", depPath) return "", fmt.Errorf("directory %s not found", depPath)
} else if err != nil { } else if err != nil {
return "", err return "", err
} }

Loading…
Cancel
Save