I was playing around with a, probably not good, idea of what a rust-like
Return type would look like: https://go2goplay.golang.org/p/k0NKN9Q6Wc1
It seems when we are returning a specific value like Result(int) from a
function as in
func myFunc(input string) Result(int) {
return Err(int)(ErrBadValue)
}
That it would be nice if we didn't have to specify Err(int) and that it
could be inferred from the return type instead.
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/golang-nuts/22e2b1dd-26e0-4605-a6c5-c2a25d25a744o%40googlegroups.com.