Re: [go-nuts] how to add items to an array without append function.

2018-01-12 Thread pradam
Hi Marvin, Awesome explanation. I have learnt alot things through your mail.once again you made my day. Thank you On 12-Jan-2018 9:31 PM, "Marvin Renich" wrote: > * pradam [180112 01:45]: > > I'm Newbie to golang, > > Welcome to Go! Many

Re: [go-nuts] how to add items to an array without append function.

2018-01-12 Thread Marvin Renich
* pradam [180112 01:45]: > I'm Newbie to golang, Welcome to Go! Many newbies often use "golang" rather than "Go" as the language name, and most old-timers usually ignore this incorrect usage, but golang is an artifact of the web site's hostname, golang.org. Also,

Re: [go-nuts] how to add items to an array without append function.

2018-01-12 Thread Shawn Milochik
On Fri, Jan 12, 2018 at 2:11 AM, pradam wrote: > Hi Shawn, > > Thank you, it was very helpful. I am not complaining about the language > just exploring the how golang works. > > Awesome! You're welcome. Sorry I misinterpreted your wording. -- You received this

Re: [go-nuts] how to add items to an array without append function.

2018-01-11 Thread pradam
Hi Shawn, Thank you, it was very helpful. I am not complaining about the language just exploring the how golang works. On Fri, Jan 12, 2018 at 12:31 PM, Shawn Milochik wrote: > What problem are you trying to solve? There's no reason to avoid append -- > it's the way the

Re: [go-nuts] how to add items to an array without append function.

2018-01-11 Thread Shawn Milochik
What problem are you trying to solve? There's no reason to avoid append -- it's the way the language provides to add items to an existing slice. You can create a slice with a length higher than zero and then put things in at specific indices: x := make([]int, 10) x[9] = 4 fmt.Println(x) m =