Fix `echo.bindData` not binding multiple values when map is used as destination
When calling echo.Bind(), echo.BindBody(), echo.BindHeaders(), etc. with *map[string]any as destination, currently multiple values of a single entry are being swallowed and only the first value is binded.
Multiple values could be a result from repeatable/array multipart/form-data fields or header with multiple values.
This issue seems to be available in both v4 and v5_alpha.
I've submitted the PR against v5_alpha since it could be a breaking change for v4 in case someone is relying on the current single value bind behavior.
could you add tests were request is multipart/form-data and another one for header binding. to have little bit higher (abstraction)level assurance how this plays along with http package.
On second thought, maybe there should be also checks to reflect on the map value to ensure that map[string]string/[]string will not panic in case mismatched values are passed?
I've pushed an update that applies different bind behavior based on the map value type (string, slice, interface) but I'm no longer sure whether the interface{} special handling is a good idea (and it can become even more complicated if we further validate the slice type whether it is string or interface{}).
Feel free to close the PR if you think that it is not clear or ambiguous.
I'm closing this PR because as mentioned above I no longer think that the suggested implementation is the right way to handle this use case.