go-tigertonic icon indicating copy to clipboard operation
go-tigertonic copied to clipboard

Extract URL component parameters in a type-safe manner

Open rcrowley opened this issue 12 years ago • 1 comments

This would be one thing to rip off from GoRest.

rcrowley avatar Jul 30 '13 22:07 rcrowley

I think I have a solution! To preserve the orthogonality of Tiger Tonic features, TrieServeMux will continue to extract URL component parameters as strings into a url.Values but Marshaled will use tags like url:"foo" to pull {foo} from the url.Values into the request struct, at which point its type will have to be made to match. If the types are incompatible (for example, if foo is presented for an int field) we can respond 400.

rcrowley avatar Oct 27 '13 20:10 rcrowley