I was able to get the Data from SQL into got but

when I print 

fmt.Println(got[1:3])
fmt.Println(got[2:3])
fmt.Println(got[1:3])
fmt.Println(got[3:3])


it produces the following result

[{2017-09-07 15:25:45.346887 +0000 +0000 HR} {2017-09-07 15:39:44.24207 
+0000 +0000 DL}]
[{2017-09-07 15:39:44.24207 +0000 +0000 DL}]
[{2017-09-07 15:25:45.346887 +0000 +0000 HR} {2017-09-07 15:39:44.24207 
+0000 +0000 DL}]
[]

When I try 

fmt.Println(got[1].DState)


it tells me that
HR

Now I want to get a slice of DState like a list and When I try
fmt.Println(got[1:3].DState)



if tells me 

got[1:3].DState undefined (type []State has no field or method DState)




*How do a get a slice of DState from got this is my question I am sorry for not 
being so elobrative.*


-- 
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.

Reply via email to