Closed roudy16 closed 5 years ago
I checked Java and C++ standard Optional implementations and it looks like throwing an exception is what they both chose to do. Having the non-nil error seems to be the Go analog to throwing an exception. But yeah, hopefully people aren't out there just ignoring errors, having optional setup this way and ignoring the error could cause a tough bug to find.
Cheers! Thanks for this. I'll update the README to call this situation out. The godocs already state that an error is returned if it's not present so thinking about it some more, I feel like it's expected behavior.
I'll cut a new release tonight. Thanks again! 🍻
Please note that I updated some test files as well.