fix: add code comments

Kubernetes-commit: 1863a808b2082ddd8d116e6b31fd41de412e8a20
This commit is contained in:
Tarun Gupta Akirala 2023-08-10 10:50:01 -07:00 committed by Kubernetes Publisher
parent f93655277b
commit 5a38750180

View File

@ -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