Skip to content

Commit

Permalink
ci: fix a go-cilinter finding about not handled error
Browse files Browse the repository at this point in the history
  • Loading branch information
graugans committed Jun 14, 2024
1 parent 3f3b1c4 commit 086ee1d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/swupdater/swupdater.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,10 @@ func (s *SWUpdater) upload(filename string) error {
}

ms := multipartstreamer.New()
ms.WriteReader(fieldname, filename, fileInfo.Size(), file)
err = ms.WriteReader(fieldname, filename, fileInfo.Size(), file)
if err != nil {
return fmt.Errorf("cannot write reader: %w", err)
}

req, _ := http.NewRequest("POST", s.urlUpload, nil)
ms.SetupRequest(req)
Expand Down

0 comments on commit 086ee1d

Please sign in to comment.