optional
optional copied to clipboard
Optional is a library of optional Go types
I think that would be a great addition.
Would be handy to reset optional value (which present) to the state where it not present. Right now you have to create new value and that looks like incomplete/unnatural.
It would be awesome to have wrappers for sql.Null* types. It will be different from the generated primitive types though. Example: ```go o := optional.NewNullInt64(sql.NullInt64{Valid: true, Int64: 55}) ``` The...
This change adds support for the big number types defined in `math/big`. It also removes the "generated-when" timestamp in the generated files. My reasoning is explained in the commit message.
Hey, thanks for this utility :) Coming from other languages, I wondered that there was not `Unwrap` which would return the value (or else panic if not set). My thinking...
Did you leave out combinators like Map, FlatMap, etc. on purpose?
This PR adds some convenience methods to make it easier to convert between pointer and Optional representation of values. Using the Optional package inevitably leads to lots of code like...
It's not clear to me at all from the README or from the generated code, how to create the bottom value (or `Nothing` in Haskell parlance). I have this generated...