News for hackers. Stuff that matters.
Re:Looking into Zig by slimsag on Saturday August 07, 2021 @03:11AM (#28096467)
Actually, not only are you right about your errdefer Go implementation - but that's actually fairly common in Go code.

Especially for tracing/logging of errors returned from functions; or for e.g. rolling back DB transactions in the event of an error.

Here's some ~100 examples from my work's (Sourcegraph's) codebase[0]

[0] https://sourcegraph.com/search?q=context:global+repo:%5Egith...

There are no comments on this comment yet.