Skip to content
This repository has been archived by the owner on Aug 8, 2024. It is now read-only.

Commit

Permalink
lint2
Browse files Browse the repository at this point in the history
  • Loading branch information
TheMarstonConnell committed Jul 2, 2024
1 parent 961e5a9 commit a634d85
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions jprov/server/file_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ func (f *FileServer) saveFile(file multipart.File, handler *multipart.FileHeader

_, err = f.archive.WriteFileToDisk(file, fid)
if err != nil {
f.logger.Error("saveFile: Write To Disk Error: ", err)
f.logger.Error(fmt.Errorf("saveFile: Write To Disk Error: %w", err).Error())
return err
}

Expand All @@ -151,7 +151,7 @@ func (f *FileServer) saveFile(file multipart.File, handler *multipart.FileHeader

msg, ctrErr := f.MakeContract(fid, sender, &wg, string(tree.Root()), fmt.Sprintf("%d", handler.Size))
if ctrErr != nil {
f.logger.Error("saveFile: CONTRACT ERROR: ", ctrErr)
f.logger.Error(fmt.Errorf("saveFile: CONTRACT ERROR: %w", ctrErr).Error())
return ctrErr
}
wg.Wait()
Expand All @@ -161,7 +161,7 @@ func (f *FileServer) saveFile(file multipart.File, handler *multipart.FileHeader
}

if err = writeResponse(*w, *msg, fid, cid); err != nil {
f.logger.Error("Json Encode Error: ", err)
f.logger.Error(fmt.Errorf("json Encode Error: %w", err).Error())
return err
}

Expand Down
2 changes: 1 addition & 1 deletion jprov/server/proofs.go
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ func (f *FileServer) postProof(cid string, blockSize, block int64) error {
}

if u.Response.Code != 0 {
f.logger.Error("Contract Response Error: %s", fmt.Errorf(u.Response.RawLog))
f.logger.Error(fmt.Errorf("contract Response error: %s", u.Response.RawLog).Error())
return nil
}

Expand Down
2 changes: 1 addition & 1 deletion jprov/strays/hand_process.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ func (h *LittleHand) Process(ctx *utils.Context, m *StrayManager) { // process t

err := h.ClaimStray(m)
if err != nil {
ctx.Logger.Error("failed to claim stray: %w", err)
ctx.Logger.Error(fmt.Errorf("failed to claim stray: %w", err).Error())
return
}

Expand Down
2 changes: 1 addition & 1 deletion jprov/strays/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ func (h *LittleHand) DownloadFileFromURL(url string, fid string, cid string) (er

fileSize, err := h.Archive.WriteFileToDisk(resp.Body, fid)
if err != nil {
h.Logger.Error("saveFile: Write To Disk Error: ", err)
h.Logger.Error(fmt.Errorf("saveFile: Write To Disk Error: %w", err).Error())
return
}

Expand Down

0 comments on commit a634d85

Please sign in to comment.