Closed arp242 closed 6 years ago
Any thoughts about this @guregu? Would you like to see any changes?
Thanks!
Hello, I think your code is fine and I appreciate the PR, but I don't want to add support for third party libraries in this. There's just too many potential things to support and the code is bloated as-is. Also, messing with UnmarshalText will break backwards compatibility. I think it's a better idea to use a fork.
Okay, fair enough. Thanks for looking at it!
This adds the
UnmarshalParam()
function from theBindUnmarshaler
interface from echo: https://github.com/labstack/echo/blob/60072188355b8972c738a041666bd4b05957c135/bind.go#L24This is useful for unmarshaling form and query values, and since it's (mostly) a proxy to
UnmarshalText()
I don't see any downsides in adding it. The only exception is theBool
; I had to addon
andoff
. I could add these just forUnmarshalParam
, but it seemed useful to me to add it toUnmarshalText
as well.