form
form copied to clipboard
Support DisallowUnknownKeys option
Not crazy about the name, but essentially an option like gorilla/schema's IgnoreUnknownKeys option. Useful for really strict validation of incoming query params.
💡 I like the idea @ansel1
I’ll have to think about how to implement as this library sets the data from the structs perspective and not the incoming data, but I’ll figure something out
maybe add a slice or map to decoder to track used keys, then compare to original values at the end of Decoder.Decode()