GitHub - jordan-bonecutter/goption: Optional values for Go

Go is (purposefully) lacking an implementation of optional types. This has lead to a few different ways to handle such values, like the sql.NullX family, ok return values, and the utilization of pointers in encoders and decoders to name a few. For fun, I’ve implemented a generic optional type which supports common encoders/decoders, SQL, and stdlib string formatting. Is this something the community finds useful?

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.