Hey @Divjot_Arora,
Yeah an example is little broken, what I need is to use a struct as field
Here is another example. Go Playground - The Go Programming Language
type URL struct {
Uri string
Prefix string
}
type MyStruct struct {
Image URL `bson:"image"`
}
And desired output saved to db:
{
image: "somestring here"
}
But instead I’ve:
{
image: {
uri: "somestring here",
prefix: ""
}
}
With old mgo driver I’ve SetBSON\GetBSON which have desired behaivour.
Thanks