Skip to content

Commit

Permalink
fix comment
Browse files Browse the repository at this point in the history
  • Loading branch information
flywukong committed Mar 27, 2023
1 parent c6369a4 commit d31e674
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions go/hash/hash.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func ComputeIntegrityHash(reader io.Reader, segmentSize int64, dataShards, parit
n, err := reader.Read(seg)
if err != nil {
if err != io.EOF {
log.Error().Msg("content read failed:" + err.Error())
log.Error().Msg("failed to read content:" + err.Error())
return nil, 0, storageTypes.REDUNDANCY_EC_TYPE, err
}
break
Expand Down Expand Up @@ -84,7 +84,7 @@ func ComputeIntegrityHash(reader io.Reader, segmentSize int64, dataShards, parit
func ComputerHashFromFile(filePath string, segmentSize int64, dataShards, parityShards int) ([][]byte, int64, storageTypes.RedundancyType, error) {
f, err := os.Open(filePath)
if err != nil {
log.Error().Msg("failed open file:" + err.Error())
log.Error().Msg("failed to open file:" + err.Error())
return nil, 0, storageTypes.REDUNDANCY_EC_TYPE, err
}
defer f.Close()
Expand Down

0 comments on commit d31e674

Please sign in to comment.