Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion converter/tests/helm_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"archive/tar"
"bytes"
"compress/gzip"
"fmt"
"io"
"os"
"strings"
Expand Down Expand Up @@ -139,7 +140,9 @@ func extractManifestFromChart(chartData []byte) (bool, string) {
}
if strings.HasSuffix(hdr.Name, "templates/manifest.yaml") {
buf := new(bytes.Buffer)
io.Copy(buf, tr)
if _, err := io.Copy(buf, tr); err != nil {
return false, fmt.Sprintf("failed to copy manifest content: %v", err)
}
return true, buf.String()
}
}
Expand Down
5 changes: 4 additions & 1 deletion generators/github/url.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package github
import (
"bufio"
"io"

"fmt"
"net/url"
"os"
"path/filepath"
Expand Down Expand Up @@ -55,6 +55,9 @@ func (u URL) GetContent() (models.Package, error) {
if strings.HasSuffix(url, ".yml") || strings.HasSuffix(url, ".yaml") {

data, err := os.ReadFile(downloadfilePath)
if err != nil {
return nil, fmt.Errorf("failed to read file %s: %w", downloadfilePath, err)
}
_, err = w.Write(data)
if err != nil {
return nil, err
Expand Down
Loading