client-go: chore: implement Is
interface for ErrGroupDiscoveryFailed
Signed-off-by: Tarun Gupta Akirala <takirala@users.noreply.github.com>
This commit is contained in:
@@ -415,6 +415,11 @@ func (e *ErrGroupDiscoveryFailed) Error() string {
|
|||||||
return fmt.Sprintf("unable to retrieve the complete list of server APIs: %s", strings.Join(groups, ", "))
|
return fmt.Sprintf("unable to retrieve the complete list of server APIs: %s", strings.Join(groups, ", "))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (e *ErrGroupDiscoveryFailed) Is(target error) bool {
|
||||||
|
_, ok := target.(*ErrGroupDiscoveryFailed)
|
||||||
|
return ok
|
||||||
|
}
|
||||||
|
|
||||||
// IsGroupDiscoveryFailedError returns true if the provided error indicates the server was unable to discover
|
// IsGroupDiscoveryFailedError returns true if the provided error indicates the server was unable to discover
|
||||||
// a complete list of APIs for the client to use.
|
// a complete list of APIs for the client to use.
|
||||||
func IsGroupDiscoveryFailedError(err error) bool {
|
func IsGroupDiscoveryFailedError(err error) bool {
|
||||||
|
Reference in New Issue
Block a user