markphelps / optional

Optional is a library of optional Go types
https://godoc.org/github.com/markphelps/optional
MIT License
209 stars 19 forks source link

MustGet #15

Closed mwielbut closed 3 years ago

mwielbut commented 3 years ago

Inspired by your https://github.com/markphelps/optional/pull/8 and the Must* pattern found in other packages I'm including a MustGet function to the standard template. It's especially useful in unit tests when you just want to compare an optional and non-optional.

markphelps commented 3 years ago

Thanks @mwielbut ! I merged in your changes and regenerated based off of current master in #17. Will create a new release as well