News for hackers. Stuff that matters.
Re:Updating the Go Memory Model by kyrra on Monday July 12, 2021 @01:06PM (#27812508)
atomic.Value can work pretty well as well, their example docs show how to do it as well: https://golang.org/pkg/sync/atomic/#example_Value_config

DBPool gets a bit more interesting. In Java world you can you providers that give you access to something, which is what middleware tends to do for Go. If you can have your middleware be able to swap the pool config its loading from, that should work just fine. atomic.Value make work here as well.

There are no comments on this comment yet.