In the majority of common use cases, the LinkError, ConnError and SessionError will contain an amqp.Error. It's simpler, for callers, if they can simply check errors.As(&amqp.Error) so they can write general error handling, rather than having to check the envelope type each time.
In the majority of common use cases, the LinkError, ConnError and SessionError will contain an amqp.Error. It's simpler, for callers, if they can simply check errors.As(&amqp.Error) so they can write general error handling, rather than having to check the envelope type each time.