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

Panic when the last function in the chain has no return value #9

Closed
mauricioklein opened this issue Oct 23, 2019 · 1 comment
Closed
Labels
bug Something isn't working

Comments

@mauricioklein
Copy link
Owner

When the last function in the chain returns nothing, the system panics:

f1 := func() int { return 0 }
f2 := func(x int) {}

New().Chain(f1, f2).Unwrap()

For the case above, the Unwrap method is supposed to return any zero-value (like an empty string) and a nil error

@mauricioklein mauricioklein added the bug Something isn't working label Oct 23, 2019
@mauricioklein
Copy link
Owner Author

mauricioklein commented Oct 24, 2019

Fixed by release v1.0.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant