Skip to content

Commit 5019774

Browse files
committed
fix(app): fixes lint issues
Signed-off-by: Mohit Nagaraj <mohitnagaraj20@gmail.com>
1 parent 07b9d23 commit 5019774

File tree

4 files changed

+9
-2
lines changed

4 files changed

+9
-2
lines changed

converter/tests/helm_test.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,9 @@ func extractManifestFromChart(chartData []byte) (bool, string) {
139139
}
140140
if strings.HasSuffix(hdr.Name, "templates/manifest.yaml") {
141141
buf := new(bytes.Buffer)
142-
io.Copy(buf, tr)
142+
if _, err := io.Copy(buf, tr); err != nil {
143+
return false, ""
144+
}
143145
return true, buf.String()
144146
}
145147
}

generators/github/url.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ func (u URL) GetContent() (models.Package, error) {
5555
if strings.HasSuffix(url, ".yml") || strings.HasSuffix(url, ".yaml") {
5656

5757
data, err := os.ReadFile(downloadfilePath)
58+
if err != nil {
59+
return nil, err
60+
}
5861
_, err = w.Write(data)
5962
if err != nil {
6063
return nil, err

go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -416,6 +416,8 @@ github.com/mattn/go-sqlite3 v1.14.22/go.mod h1:Uh1q+B4BYcTPb+yiD3kU8Ct7aC0hY9fxU
416416
github.com/mattn/go-sqlite3 v1.14.24 h1:tpSp2G2KyMnnQu99ngJ47EIkWVmliIizyZBfPrBWDRM=
417417
github.com/mattn/go-sqlite3 v1.14.24/go.mod h1:Uh1q+B4BYcTPb+yiD3kU8Ct7aC0hY9fxUwlHK0RXw+Y=
418418
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
419+
github.com/meshery/schemas v0.8.22 h1:JQ7PoEheiXdkIG/h965L+DB7p/JdGEgs3i5r0EniSt4=
420+
github.com/meshery/schemas v0.8.22/go.mod h1:tuAmsG9WJRjZ0Iv12HIAhKZbWpfpkTRjfPNThKbr7HA=
419421
github.com/miekg/dns v1.1.57 h1:Jzi7ApEIzwEPLHWRcafCN9LZSBbqQpxjt/wpgvg7wcM=
420422
github.com/miekg/dns v1.1.57/go.mod h1:uqRjCRUuEAA6qsOiJvDd+CFo/vW+y5WR6SNmHE55hZk=
421423
github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw=

utils/component/generator.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ func IncludeComponentBasedOnGroup(resource string, groupFilter string) (bool, er
7272
group, err := extractCueValueFromPath(crdCue, DefaultPathConfig.GroupPath)
7373

7474
if err != nil {
75-
logrus.Info("Failed to extract group from crd %v", err)
75+
logrus.Infof("Failed to extract group from crd %v", err)
7676
}
7777

7878
return group == groupFilter, nil

0 commit comments

Comments
 (0)