Re: [go-nuts] Channels: selecting the last element

2018-12-18 Thread Diane Looney
Just realized what you meant about buffered channels. I'm wrong, and sorry for the confusion. +1 to your original solution (combined with setting channels to nil). Diane Looney On Tue, Dec 18, 2018 at 11:31 AM Chris Burkert wrote: > Hello Ian, all, > yes, the workers genera

Re: [go-nuts] Channels: selecting the last element

2018-12-18 Thread Diane Looney
;- rc if ! ok { return } n++ } }() wg1.Wait() close(fc) close(rc) wg2.Wait() return n } Diane Looney On Tue, Dec 18, 2018 at 11:31 AM Chris Burkert wr

Re: [go-nuts] JSON dynamic keys

2018-12-03 Thread Diane Looney
o get the behavior you want, then that might be your best bet. example is in godoc at https://golang.org/pkg/encoding/json/ under CustomMarshalJSON Diane Looney On Mon, Dec 3, 2018 at 10:53 AM Burak Serdar wrote: > On Mon, Dec 3, 2018 at 8:27 AM Jeffrey Smith > wrote: > > >