mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 19:56:01 +00:00
Merge pull request #100917 from lojies/typeassertionomitnil
Omit redundant nil check in type assertion
This commit is contained in:
commit
9a26b83271
@ -136,7 +136,7 @@ type apiGroupHandler struct {
|
||||
|
||||
func (r *apiGroupHandler) ServeHTTP(w http.ResponseWriter, req *http.Request) {
|
||||
apiServices, err := r.lister.List(labels.Everything())
|
||||
if statusErr, ok := err.(*apierrors.StatusError); ok && err != nil {
|
||||
if statusErr, ok := err.(*apierrors.StatusError); ok {
|
||||
responsewriters.WriteRawJSON(int(statusErr.Status().Code), statusErr.Status(), w)
|
||||
return
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user