How do we assign UID
value to struct data.
I have a user with uid
- “0x4” and I am trying to assign the user with the post using below construct but, it is not saving OwnerUserID
data and it is storing everything :-
p := Post{
CreatedAt: &cdate,
...
OwnerUserID: "<0x4>",
...
}
I have below post struct -
type Post struct {
UID string `json:"uid,omitempty"`
...
OwnerUserID string `json:"uid,omitempty"`
...
}
I have a schema of uid
type for OwnerUserID
, after running and fetching above code, I get below data -
{"me":[{"uid":"0x19","Title":"What should I do to improve my memory?","Tags":" life problem memory"}]}
So, you can see, it is not storing data of OwnerUserID