Re: [go-nuts] Need explaination for code

2019-07-27 Thread thatipelli santhosh
Thank you for explaining that @brian Hatfield On Sat, Jul 27, 2019, 00:02 Brian Hatfield wrote: > Welcome to Go! > > There's a couple things going on here, which you can break down into two > overarching parts. > > Part 1, var/type definition: > > var testCases = []struct { > description

Re: [go-nuts] Need explaination for code

2019-07-26 Thread Jan Mercl
On Fri, Jul 26, 2019 at 8:15 PM thatipelli santhosh wrote: > Can anyone please explain this piece of code? this would be more helpful to > me to understand this. Thank you! I don't know what "explain this code" means in this case. But maybe this can help: https://play.golang.org/p/t4yDlOwG-rv

Re: [go-nuts] Need explaination for code

2019-07-26 Thread Brian Hatfield
Welcome to Go! There's a couple things going on here, which you can break down into two overarching parts. Part 1, var/type definition: var testCases = []struct { description string planet Planet seconds float64 expectedfloat64 } This says the following things: - Create a

[go-nuts] Need explaination for code

2019-07-26 Thread thatipelli santhosh
Hi , I am learning Go step by step. I have go through with slices and structs but this below code sample is using slices and structs both at a time. Can anyone please explain this piece of code? this would be more helpful to me to understand this. Thank you! var testCases = []struct {