lint: fix unhandled errors
This commit is contained in:
parent
9bef739621
commit
d7cbc22da4
12 changed files with 151 additions and 56 deletions
|
|
@ -243,7 +243,10 @@ func randomSHA1String() (string, error) {
|
|||
} else if n != 20 {
|
||||
return "", errors.New("randomSHA1String: short read from rand")
|
||||
}
|
||||
hash.Write(data)
|
||||
_, err = hash.Write(data)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
return hex.EncodeToString(hash.Sum(nil)), nil
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue