> I see that it's possible to get the types of parameters to a function using
> the reflect module. Is there any way (even a very hacky way) of getting
> the names of the parameters as well?
No.
> The goal is to automatically parse form parameters and call the handler
> function with them. e.g.
> <input name="id" value="5">
> <input name="name" value="foo">
>
> func handler(id int, name string) { ... }
You could have the function take a single value of struct type.
Reflection would give you the field names.
Ian
> The goal is to automatically parse form parameters and call the handler
> function with them. e.g.
You could have the function take a single value of struct type.
Reflection would give you the field names.