[go-nuts] Re: How to fill a map with requests from client

2020-01-03 Thread nks
that's right On Friday, January 3, 2020 at 5:51:22 PM UTC+9, Amnon Baron Cohen wrote: > > all := make(map[string]string) // create the map > all["client request"] = clientJob.name// append the client requests > on map > > > gets called each time a request arrives. > So a new

[go-nuts] Re: How to fill a map with requests from client

2020-01-03 Thread Amnon Baron Cohen
I have copied the problematic lines of your code into a tiny programme on the Go playground. https://play.golang.org/p/9vMrdtC-2zX If you run it you will see the problem. I would play around with the code to get a feel for what is happening. If you want to append job names, then you probably

[go-nuts] Re: How to fill a map with requests from client

2020-01-03 Thread Amnon Baron Cohen
all := make(map[string]string) // create the map all["client request"] = clientJob.name// append the client requests on map gets called each time a request arrives. So a new empty map gets created each time a request arrives. The comment on the second line is wrong. The