• Optional types are usually used in error handling. I think this is more an interesting experiment/tutorial than a thing you'd use in production, because your errors are all over your app probably using custom types, though, I guess you could wrap every custom type with this too.


    I think it's interesting to see what people are doing with ideas from other languages, even if they're not something you'd recommend or use in go. For example he touches on the concept of byte comparison of files for tests, which is generally useful, not just in this case.

    I'd be interested to see an app using this though, just to see what it does to the structure - I don't think heavy use of go generate like this for every single type you use is practical on an ongoing basis, but perhaps if you keep it in separate files it's manageable.