From 7cef40cb831e0238528fbf9fe0f8e76212da0c5e Mon Sep 17 00:00:00 2001 From: Zhenguo Niu Date: Thu, 30 Aug 2018 15:03:50 +0800 Subject: [PATCH] Clean up unneeded break in switch There's no need to explicitly add break after every case, as switch statements will break automatically. --- staging/src/k8s.io/apiserver/pkg/endpoints/installer.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/staging/src/k8s.io/apiserver/pkg/endpoints/installer.go b/staging/src/k8s.io/apiserver/pkg/endpoints/installer.go index 4a3c498671..2954bdc23b 100644 --- a/staging/src/k8s.io/apiserver/pkg/endpoints/installer.go +++ b/staging/src/k8s.io/apiserver/pkg/endpoints/installer.go @@ -396,7 +396,6 @@ func (a *APIInstaller) registerResourceHandlers(path string, storage rest.Storag actions = appendIf(actions, action{"WATCH", "watch/" + itemPath, nameParams, namer, false}, isWatcher) actions = appendIf(actions, action{"CONNECT", itemPath, nameParams, namer, false}, isConnecter) actions = appendIf(actions, action{"CONNECT", itemPath + "/{path:*}", proxyParams, namer, false}, isConnecter && connectSubpath) - break default: namespaceParamName := "namespaces" // Handler for standard REST verbs (GET, PUT, POST and DELETE). @@ -450,7 +449,6 @@ func (a *APIInstaller) registerResourceHandlers(path string, storage rest.Storag actions = appendIf(actions, action{"LIST", resource, params, namer, true}, isLister) actions = appendIf(actions, action{"WATCHLIST", "watch/" + resource, params, namer, true}, allowWatchList) } - break } // Create Routes for the actions.