-
Notifications
You must be signed in to change notification settings - Fork 686
How to use mapstructure with google uuid #236
Comments
You could create your own hook, something like:
|
ah okay.. how should this be used exactly in the decode function? |
You need to set the hook in the configuration, for example:
|
@alex-rufo maybe this could be added somewhere as example? i guess UUID is a common use case for a lot of devs? |
Hi, Is it possible to use a custom hook when converting (in the other direction) from a struct to a map ? I am using the How can I achieve this? Thank you |
How about this?
|
One issue I've noticed, which is specific to https://github.com/google/uuid, is that it is not possible to have However, it would be nice if mapstructure had the ability to handle
|
Hello, Thank you very much for this issue. How can we use UUID when u decode from
I noticed the Any help will be appreciated. |
Hi,
i'm just trying to decode a map into a struct with uuid but it looks like its not working out of the box.
So is there a trick to get mapstructure working with uuid of google?
Here is a small playground.
https://play.golang.org/p/Gn08PEr9shS
Thanks
The text was updated successfully, but these errors were encountered: