mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-13 13:55:41 +00:00
client-go: chore: implement Is
interface for ErrGroupDiscoveryFailed
Signed-off-by: Tarun Gupta Akirala <takirala@users.noreply.github.com>
This commit is contained in:
parent
1620473a9a
commit
6aad00ff73
@ -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, ", "))
|
||||
}
|
||||
|
||||
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