Is reports whether the target error is equal to this error.
(target error)
| 833 | |
| 834 | // Is reports whether the target error is equal to this error. |
| 835 | func (e *NATSError) Is(target error) bool { |
| 836 | if e == nil { |
| 837 | return false |
| 838 | } |
| 839 | if t, ok := target.(*NATSError); ok { |
| 840 | return e.Subject == t.Subject && e.Description == t.Description |
| 841 | } |
| 842 | return e.err != nil && errors.Is(e.err, target) |
| 843 | } |
| 844 | |
| 845 | func (g *group) AddEndpoint(name string, handler Handler, opts ...EndpointOpt) error { |
| 846 | var options endpointOpts |
no outgoing calls