Closed arp242 closed 5 years ago
Thanks you again for this PR! 👍 Look good to me. I think that remove the support to older versions not should be a problem. @markbates what do you think?
According to https://gobuffalo.io/en, Buffalo requires Go 1.10.8, so should be grand.
Sidenote: you probably want to tag releases as 3.2.0
, instead of 3.2
. Otherwise Go modules won't pick up on the version numbers, and it gets added as this. Kinda sucks as those patch releases are not all that useful IMHO, but it is what it is...
The main reason for this is that I want to log (but not ignore) unknown form fields:
There was no way to get this information previously, and with
IgnoreUnknownKeys
I would never know if there was an unknown key.IMHO the
IgnoreUnknownKeys
option could be deprecated with this, as it's now redundant. But that's a backwards-incompatible change (perhaps something to consider for a v2?)While I was changing
newError()
, I also changed it to pass the field and path and build the string with it.Note:
strings.Builder
is Go 1.10 and newer only. Previously formam supported a lot of quite old Go versions, and I took the liberty of changing that. I can change it to use string concatenation if you prefer, this is just a bit faster.