Go Time: Golang, Software Engineering cover image

The bits of Go we avoid (and why)

Go Time: Golang, Software Engineering

00:00

Is There a Way to Avoid Global State?

I would actually do away with global state altogether. If you're going to try and sort of mock it or something, it'll interfere with it in weird ways. I think that the key is with usages of global state that aren't bad is they're essentially constant. So some of those, you can't actually use the const keyword because for example, the file store has to be a fs variable so there's no such thing as anfs constant. But once the application starts up, you're not changing it. You're not modifying it. Yeah. It probably shouldn't live at the package level after if you're modifying it after startup. That's pretty much a very clear bright

Transcript
Play full episode

The AI-powered Podcast Player

Save insights by tapping your headphones, chat with episodes, discover the best highlights - and more!
App store bannerPlay store banner
Get the app