Closed pilinux closed 1 year ago
Out of curiousity, what command did you use to get this?
These potential errors don't need to be checked because they've already been checked above or are basically a guaranteed success. For example:
Picocrypt.go:449:17: Error return value of `rand.Read` is not checked (errcheck)
It's safe to assume that crypto/rand
will produce things correctly.
Picocrypt.go:861:13: Error return value of `fin.Read` is not checked (errcheck)
There's already a check on L851 when opening a file. If the file can be opened, it can generally be read without issues.
And so on. Sure, these are "real" errors that can be checked, but it's diminishing returns in terms of code cleanliness.
For all go projects, I generally use:
Perhaps you can check and handle the errors (when not equals to nil) returned from different functions? Thanks.