Skip to content

Commit

Permalink
optimize os error message
Browse files Browse the repository at this point in the history
  • Loading branch information
bxy4543 committed Jan 9, 2024
1 parent f5e9e41 commit dcaf8c4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions controllers/pkg/objectstorage/objectstorage.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,11 +135,11 @@ func QueryPrometheus(host, bucketName, instance string) (int64, error) {

rcvdBytes, err := strconv.ParseInt(rcvdStr, 10, 64)
if err != nil {
return 0, fmt.Errorf("failed to parse rcvdBytes to int64")
return 0, fmt.Errorf("failed to parse rcvdStr %s to int64: %v", rcvdStr, err)
}
sentBytes, err := strconv.ParseInt(sentStr, 10, 64)
if err != nil {
return 0, fmt.Errorf("failed to parse rcvdBytes to int64")
return 0, fmt.Errorf("failed to parse sentStr %s to int64: %v", sentStr, err)
}

fmt.Printf("received bytes: %d, send bytes: %d\n", rcvdBytes, sentBytes)
Expand Down

0 comments on commit dcaf8c4

Please sign in to comment.