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 are 8 occurrences of this issue in the repository.
See all occurrences on DeepSource → deepsource.io/gh/DMEvanCT/GoBase/issue/CRT-D0011/occurrences/
Description
In these cases, in case of failure,
defernever 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 are 8 occurrences of this issue in the repository.
See all occurrences on DeepSource → deepsource.io/gh/DMEvanCT/GoBase/issue/CRT-D0011/occurrences/