At this point, variable got is a slice of length 0. If you tried to access got[0], you'd get a panic at runtime for out of bounds access.
You could add a State to it like this: got = append(got, State{ DLastmodified: time.Now(), DState: "test" }) and then access it with got[0]. You would probably benefit from working your way all the way through the Go Tour: https://tour.golang.org/ Welcome and good luck. -jeff On Thursday, October 26, 2017 at 8:30:29 AM UTC+2, Vikram Rawat wrote: > > I have created a struct > > type State struct{ > DLastmodified time.Time > DState string > } > > > > and created a slice of struct like > > > got :=[]State{} > > > Now I am unable to get the column data out of this slice. please help. If you > want to read the full code let me know. > > I just wanted to know how to get the data out of it. *Please help.* > > > > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.