Closed
Description
I have that struct:
type Space struct {
UUID uuid.UUID `json:"uuid" msgpack:"uuid"`
Name string `json:"name" msgpack:"name"`
}
So I do simple marshal/unmarshal:
space := &comments.Space{}
b, err := msgpack.Marshal(&comments.Space{UUID: uuid.New(), Name: "foo bar"})
var item comments.Space
err = msgpack.Unmarshal(b, &item)
fmt.Println(item) // UUID: 123e4567-e89b-12d3-a456-426614174000 Name: ""
As you can see Name is empty after unmashalling, but It have to be "foo bar".
If I use https://github.com/citilinkru/uuid-msgpack the code above will work good and name will be "foo bar", but I can't combine both packages because of conflicts.