Re: [go-nuts] Analysis check for leaked pointers to loop variable address

2021-03-15 Thread Barisere Jonathan
a warning. I'm betting that since it's an error in most of the cases I've come across, a warning will be useful most of the time. On Monday, March 15, 2021 at 8:34:14 AM UTC+1 Jan Mercl wrote: > On Mon, Mar 15, 2021 at 3:03 AM Barisere Jonathan > wrote: > > > I think this mistak

[go-nuts] Analysis check for leaked pointers to loop variable address

2021-03-14 Thread Barisere Jonathan
Hello everyone. I have a question about a common programming error I have made several times. It regards the use of a pointer to a loop variable outside of the loop. Basically, we want to convert a slice, map, or channel of items (the source sequence) into a map, slice, or channel of pointers