I have generated go struct from json. And it gave me next output:
type PartnerBody87 struct {
Imp []struct {
Bidfloor float64 `json:"bidfloor"`
Secure int `json:"secure"`
Ext struct {
Type string `json:"type"`
Webpush int `json:"webpush"`
} `json:"ext"`
ID string `json:"id"`
Tagid string `json:"tagid"`
} `json:"imp"`
}
I tried different ways, and cannot find proper one of how to initiate the value for Imp []struct.
Update: I know that I can split struct into few types. But I'm curious if Go have ability to set everything in 1 struct - than how to use it?