Do you mean sum types? Like Haskell's Maybe and Rust's Result?
Re:Working with Errors in Go 1.13
by littlestymaar on Sunday October 20, 2019 @06:55AM
(#21303385)
Sum types indeed, thanks. That's why I shouldn't post before breakfast.
Treating errors as value is cool (no exception!) but using multiple values not so much, the proper way to do so is with product types, but Go's type system don't have them unfortunately…