Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Add MakeMultiEncoder #99

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

[WIP] Add MakeMultiEncoder #99

wants to merge 1 commit into from

Conversation

keks
Copy link
Contributor

@keks keks commented Apr 16, 2018

This PR addresses #73.

Note that this simply encodes the values. It does not add any type hints, which is what you might actually want. Let's further discuss this in the issue.

@ghost ghost assigned keks Apr 16, 2018
@ghost ghost added the status/in-progress In progress label Apr 16, 2018
// The resulting encoder then uses the encoder of the pair with matching first element.
// Example:
// e := MakeMultiEncoder(
// "string", MakeTypedEncoder(func(req *Request, w io.Writer, str string) error {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we be able to use reflection to get the type from the function signature, instead of manually writing the type?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We do, we could also pass an empty string but this is more descriptive.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants