DEV Community

Discussion on: Finding and fixing memory leaks in Go

Collapse
 
stevenacoffman profile image
Steve Coffman

Is there a linter for creating a client without close? I've fixed this bug way too many times already (I just found it again today!).

Collapse
 
tbpalsulich profile image
Tyler Bui-Palsulich

Not that I know of. The main concern is false positives (e.g. a long-lived client that gets closed elsewhere). But, missing a Close can be relatively expensive. So...