You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.
Currently the generated code has a dependency on pkg/runtime in this module, mostly to support Bind* functions.
While generated methods of the wrapper know exactly which types are needed in Go for the params, they call fairly generic Bind* functions that take these params via interface{}. This seems a bit backward - if we already have a concrete type, why bind it through a generic function that uses runtime dispatch?
It should be possible for the generated code to directly bind parameters - given a known concrete type it should be only a few lines of code per parameter. This would be faster, but more importantly dependency-free - the generated code would only be dependent on Echo (or other framework used).
The text was updated successfully, but these errors were encountered:
Yes, I've been meaning to do that, but it's really tricky. I've got a branch where it kinda works, but I have to break out all the special cases we have into their own functions and insert those into the spec. We'd also need to inline a whole lot of string manipulation functions. One day :)
Currently the generated code has a dependency on
pkg/runtimein this module, mostly to supportBind*functions.While generated methods of the wrapper know exactly which types are needed in Go for the params, they call fairly generic
Bind*functions that take these params viainterface{}. This seems a bit backward - if we already have a concrete type, why bind it through a generic function that uses runtime dispatch?It should be possible for the generated code to directly bind parameters - given a known concrete type it should be only a few lines of code per parameter. This would be faster, but more importantly dependency-free - the generated code would only be dependent on Echo (or other framework used).
The text was updated successfully, but these errors were encountered: