Commit 55d1b5e3 authored by SataQiu's avatar SataQiu

fix golint failures of pkg/registry/rbac/clusterrole

parent d76f1a8f
...@@ -288,7 +288,6 @@ pkg/registry/networking/rest ...@@ -288,7 +288,6 @@ pkg/registry/networking/rest
pkg/registry/node/rest pkg/registry/node/rest
pkg/registry/policy/poddisruptionbudget/storage pkg/registry/policy/poddisruptionbudget/storage
pkg/registry/policy/rest pkg/registry/policy/rest
pkg/registry/rbac/clusterrole
pkg/registry/rbac/clusterrole/policybased pkg/registry/rbac/clusterrole/policybased
pkg/registry/rbac/clusterrolebinding pkg/registry/rbac/clusterrolebinding
pkg/registry/rbac/clusterrolebinding/policybased pkg/registry/rbac/clusterrolebinding/policybased
......
...@@ -14,6 +14,6 @@ See the License for the specific language governing permissions and ...@@ -14,6 +14,6 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
// Package certificates provides Registry interface and its RESTStorage // Package clusterrole provides Registry interface and its RESTStorage
// implementation for storing ClusterRole objects. // implementation for storing ClusterRole objects.
package clusterrole // import "k8s.io/kubernetes/pkg/registry/rbac/clusterrole" package clusterrole // import "k8s.io/kubernetes/pkg/registry/rbac/clusterrole"
...@@ -61,6 +61,7 @@ type AuthorizerAdapter struct { ...@@ -61,6 +61,7 @@ type AuthorizerAdapter struct {
Registry Registry Registry Registry
} }
// GetClusterRole returns the corresponding ClusterRole by name
func (a AuthorizerAdapter) GetClusterRole(name string) (*rbacv1.ClusterRole, error) { func (a AuthorizerAdapter) GetClusterRole(name string) (*rbacv1.ClusterRole, error) {
return a.Registry.GetClusterRole(genericapirequest.NewContext(), name, &metav1.GetOptions{}) return a.Registry.GetClusterRole(genericapirequest.NewContext(), name, &metav1.GetOptions{})
} }
...@@ -34,7 +34,7 @@ type strategy struct { ...@@ -34,7 +34,7 @@ type strategy struct {
names.NameGenerator names.NameGenerator
} }
// strategy is the default logic that applies when creating and updating // Strategy is the default logic that applies when creating and updating
// ClusterRole objects. // ClusterRole objects.
var Strategy = strategy{legacyscheme.Scheme, names.SimpleNameGenerator} var Strategy = strategy{legacyscheme.Scheme, names.SimpleNameGenerator}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment