Re: [go-nuts] Confusion regarding templates and iterating over map

2019-04-07 Thread Amit Saha
On Mon, Apr 8, 2019 at 2:41 PM Ian Lance Taylor wrote: > On Sun, Apr 7, 2019 at 6:19 PM Amit Saha wrote: > > > > I am seeing (what I think) a somewhat confusing behavior which I am not > sure I understand. The working code example is at > https://play.golang.org/p/GEqT4MiZQnq > > > > > > Basical

Re: [go-nuts] Confusion regarding templates and iterating over map

2019-04-07 Thread Ian Lance Taylor
On Sun, Apr 7, 2019 at 6:19 PM Amit Saha wrote: > > I am seeing (what I think) a somewhat confusing behavior which I am not sure > I understand. The working code example is at > https://play.golang.org/p/GEqT4MiZQnq > > > Basically, I have a map which I am iterating over in a template: > > > m :

[go-nuts] Confusion regarding templates and iterating over map

2019-04-07 Thread Amit Saha
Hi all, I am seeing (what I think) a somewhat confusing behavior which I am not sure I understand. The working code example is at https://play.golang.org/p/GEqT4MiZQnq Basically, I have a map which I am iterating over in a template: m := map[int]string{ 1: "\"Hello\"\n", 2: "\"World\"\n",