mirror of
https://github.com/kubernetes/client-go.git
synced 2025-07-07 03:59:36 +00:00
client-go: chore: implement Is
interface for ErrGroupDiscoveryFailed
Signed-off-by: Tarun Gupta Akirala <takirala@users.noreply.github.com> Kubernetes-commit: 6aad00ff73d10378d33d615505239c5373a1108b
This commit is contained in:
parent
17c66cc83d
commit
f93655277b
@ -420,6 +420,11 @@ func (e *ErrGroupDiscoveryFailed) Error() string {
|
||||
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
|
||||
// a complete list of APIs for the client to use.
|
||||
func IsGroupDiscoveryFailedError(err error) bool {
|
||||
|
Loading…
Reference in New Issue
Block a user