Comment on Toward Go 1.3parentComments−4ad12yOf course you can, error is an interface, any number of concrete types can satisfy it, and you can use type assertions or type switches to unbox (and use) that concrete type.This is a widely used idiom in Go.
Comments
Of course you can, error is an interface, any number of concrete types can satisfy it, and you can use type assertions or type switches to unbox (and use) that concrete type.
This is a widely used idiom in Go.