In these cases, in case of failure, defer never gets called. Example: go defer os.Remove(filename) if bad { log.Fatalf("something bad happened") } should be written as: go defer os.Remove(filename) if bad { log.Printf("something bad happened") return }
Occurrences
There is 1 occurrence of this issue in the repository.
Description
In these cases, in case of failure,
defer
never gets called. Example:go defer os.Remove(filename) if bad { log.Fatalf("something bad happened") }
should be written as:go defer os.Remove(filename) if bad { log.Printf("something bad happened") return }
Occurrences
There is 1 occurrence of this issue in the repository.
See all occurrences on DeepSource → deepsource.io/gh/jasonBirchall/crypto/issue/CRT-D0011/occurrences/