Skip to content

Commit

Permalink
Clean up lint flags
Browse files Browse the repository at this point in the history
  • Loading branch information
liamfallon committed Jan 9, 2025
1 parent 6bbceaf commit 4c46ea5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions pkg/cache/dbcache/dbpackage.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ func (p *dbPackage) metaAsJson() string {

func (p *dbPackage) setMetaFromJson(jsonMeta string) {
p.meta = metav1.ObjectMeta{}
json.Unmarshal([]byte(jsonMeta), p.meta)
json.Unmarshal([]byte(jsonMeta), &p.meta)

Check failure on line 150 in pkg/cache/dbcache/dbpackage.go

View workflow job for this annotation

GitHub Actions / lint

Error return value of `json.Unmarshal` is not checked (errcheck)
}

func (p *dbPackage) specAsJson() string {
Expand All @@ -157,5 +157,5 @@ func (p *dbPackage) specAsJson() string {

func (p *dbPackage) setSpecFromJson(jsonSpec string) {
p.spec = v1alpha1.PackageSpec{}
json.Unmarshal([]byte(jsonSpec), p.spec)
json.Unmarshal([]byte(jsonSpec), &p.spec)

Check failure on line 160 in pkg/cache/dbcache/dbpackage.go

View workflow job for this annotation

GitHub Actions / lint

Error return value of `json.Unmarshal` is not checked (errcheck)
}
4 changes: 2 additions & 2 deletions pkg/cache/dbcache/dbpackagerevision.go
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ func (pr *dbPackageRevision) metaAsJson() string {

func (pr *dbPackageRevision) setMetaFromJson(jsonMeta string) {
pr.meta = metav1.ObjectMeta{}
json.Unmarshal([]byte(jsonMeta), pr.meta)
json.Unmarshal([]byte(jsonMeta), &pr.meta)

Check failure on line 269 in pkg/cache/dbcache/dbpackagerevision.go

View workflow job for this annotation

GitHub Actions / lint

Error return value of `json.Unmarshal` is not checked (errcheck)
}

func (pr *dbPackageRevision) specAsJson() string {
Expand All @@ -276,5 +276,5 @@ func (pr *dbPackageRevision) specAsJson() string {

func (pr *dbPackageRevision) setSpecFromJson(jsonSpec string) {
pr.spec = v1alpha1.PackageRevisionSpec{}
json.Unmarshal([]byte(jsonSpec), pr.spec)
json.Unmarshal([]byte(jsonSpec), &pr.spec)
}

0 comments on commit 4c46ea5

Please sign in to comment.