Original post

Recently I’ve been learning and started building a small project with Gin. Ideally I’d like to be able to insert into a concurrent map via a POST request and read a given key with a GET request. However, I’m a bit flustered as to where I should instantiate the map and the best way to access it from functions mapped to GET / POST routes in Gin. I seem to understand how a database or KV store would be connected to Gin, but I’m a bit lost as to how I would do this with a locally defined concurrent map?

Any help is appreciated!