diff --git a/discovery/discovery_client.go b/discovery/discovery_client.go index 50286f4e..df0e0f99 100644 --- a/discovery/discovery_client.go +++ b/discovery/discovery_client.go @@ -420,6 +420,7 @@ func (e *ErrGroupDiscoveryFailed) Error() string { return fmt.Sprintf("unable to retrieve the complete list of server APIs: %s", strings.Join(groups, ", ")) } +// Is makes it possible for the callers to use `errors.Is(` helper on errors wrapped with ErrGroupDiscoveryFailed error. func (e *ErrGroupDiscoveryFailed) Is(target error) bool { _, ok := target.(*ErrGroupDiscoveryFailed) return ok