Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
cdmistman committed Oct 12, 2023
1 parent bf1023e commit 32e7c30
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions test-suite/utils/upm.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,10 @@ func (bt *BackendT) UpmInfo(pkg string) {
}

var info api.PkgInfo
json.NewDecoder(strings.NewReader(out.Stdout)).Decode(&info)
err = json.NewDecoder(strings.NewReader(out.Stdout)).Decode(&info)
if err != nil {
bt.Fail("failed to decode json: %v", err)
}

if info.Name != pkg {
bt.Fail("expected info for %s, got %s", pkg, info.Name)
Expand Down Expand Up @@ -152,7 +155,10 @@ func (bt *BackendT) UpmListLockFile() []api.PkgInfo {
}

var results []api.PkgInfo
json.NewDecoder(strings.NewReader(out.Stdout)).Decode(&results)
err = json.NewDecoder(strings.NewReader(out.Stdout)).Decode(&results)
if err != nil {
bt.Fail("failed to decode json: %v", err)
}

return results
}
Expand All @@ -172,7 +178,10 @@ func (bt *BackendT) UpmListSpecFile() []api.PkgInfo {
}

var results []api.PkgInfo
json.NewDecoder(strings.NewReader(out.Stdout)).Decode(&results)
err = json.NewDecoder(strings.NewReader(out.Stdout)).Decode(&results)
if err != nil {
bt.Fail("failed to decode json: %v", err)
}

return results
}
Expand Down Expand Up @@ -293,7 +302,10 @@ func (bt *BackendT) UpmSearch(query, expectName string) {
}

var results []api.PkgInfo
json.NewDecoder(strings.NewReader(out.Stdout)).Decode(&results)
err = json.NewDecoder(strings.NewReader(out.Stdout)).Decode(&results)
if err != nil {
bt.Fail("failed to decode json: %v", err)
}

found := false
for _, result := range results {
Expand Down

0 comments on commit 32e7c30

Please sign in to comment.