"main" is also the name of the main function, maybe try with a different one.
On Tuesday, October 11, 2016 at 11:54:54 PM UTC+2, Dan wrote: > > I need following output > [ > { > date:'2017-07-07', > flags: { > a:1 > b:2 > } > }, > { > date:'2017-07-08', > flags: { > a:3 > b:4 > } > } > ] > > so I am trying to do it as follows but not getting desired output, can > some one suggest right approach. > > type main struct{ > date : time.Time > flags: []*flag > } > > type flag struct{ > a:int > b:int > } > > when I use this after my database query to build the map , I am getting > error - main is not a type. > -- 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.