News for hackers. Stuff that matters.
Re:REST Servers in Go: Part 1 – standard library by physicles on Sunday January 17, 2021 @08:39PM (#25817269)
If you only want to hold the lock for a portion of a function, pull that part out into its own function. Makes the code much easier to reason about. I consider .Unlock() without defer to be a code smell in nearly all cases.

There are no comments on this comment yet.