You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.
I'm currently using mapstructure for an API, to convert a map[string]interface{} extracted from user inputs into a structure.
The main use-case is working very well, however I would like to generate my own error messages instead of directly using the error returned by the library.
The required information would be:
which field failed to be converted
what was the expected type
what was the type of the field that failed to be converted
From what I've seen, this is currently not easily done with mapstructure.
Do you think it would be possible to find those information after a call to Decode without having to scan the error message string?
The text was updated successfully, but these errors were encountered:
Hi there,
I'm currently using mapstructure for an API, to convert a
map[string]interface{}
extracted from user inputs into a structure.The main use-case is working very well, however I would like to generate my own error messages instead of directly using the error returned by the library.
The required information would be:
From what I've seen, this is currently not easily done with mapstructure.
Do you think it would be possible to find those information after a call to
Decode
without having to scan the error message string?The text was updated successfully, but these errors were encountered: