clean-architecture-go-v2
clean-architecture-go-v2 copied to clipboard
Is using `newInmem` only used for testing?
Since you are using stdlib map
, in inmem.go
inside use cases, I was wondering if this is ever relied on inside of the HTTP Handlers. If so, this would not be thread safe since HTTP Handlers are completely concurrent in go https://golang.org/doc/faq#atomic_maps.
If this is inded the case and you need a solution, you could use sync.Map
which is thread safe.