use fmt package for Errorf call in load.go

Signed-off-by: James Sheppard <jgsheppa@protonmail.com>
pull/12063/head
James Sheppard 2 years ago
parent 957debec7b
commit f0f25656d2

@ -18,6 +18,7 @@ package loader
import ( import (
"bytes" "bytes"
"fmt"
"log" "log"
"os" "os"
"path/filepath" "path/filepath"
@ -171,7 +172,7 @@ func LoadFiles(files []*BufferedFile) (*chart.Chart, error) {
case filepath.Ext(n) == ".tgz": case filepath.Ext(n) == ".tgz":
file := files[0] file := files[0]
if file.Name != n { if file.Name != n {
return c, errors.Errorf("error unpacking tar in %s: expected %s, got %s", c.Name(), n, file.Name) return c, fmt.Errorf("error unpacking tar in %s: expected %s, got %s", c.Name(), n, file.Name)
} }
// Untar the chart and add to c.Dependencies // Untar the chart and add to c.Dependencies
sc, err = LoadArchive(bytes.NewBuffer(file.Data)) sc, err = LoadArchive(bytes.NewBuffer(file.Data))

Loading…
Cancel
Save