How can I get its _id? Should I declare in the structure? I've tried but I cannot figure out. Just starting with mongo in go and your samples are very useful.
Thanks!
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Hi!
Pretty cool all samples, thanks.
What about if I have:
type Hero struct {
MyVar1 bool
json:"signed" bson:"signed"
MyVar2 string
json:"alias" bson:"alias"
MyVar3 string
json:"name" bson:"name"
}
How can I get its _id? Should I declare in the structure? I've tried but I cannot figure out. Just starting with mongo in go and your samples are very useful.
Thanks!