fix golint failures of pkg/registry/rbac/clusterrole

This commit is contained in:
SataQiu
2019-04-24 16:17:12 +08:00
parent d76f1a8fd6
commit 55d1b5e3d4
4 changed files with 3 additions and 3 deletions

View File

@@ -288,7 +288,6 @@ pkg/registry/networking/rest
pkg/registry/node/rest
pkg/registry/policy/poddisruptionbudget/storage
pkg/registry/policy/rest
pkg/registry/rbac/clusterrole
pkg/registry/rbac/clusterrole/policybased
pkg/registry/rbac/clusterrolebinding
pkg/registry/rbac/clusterrolebinding/policybased

View File

@@ -14,6 +14,6 @@ See the License for the specific language governing permissions and
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.
package clusterrole // import "k8s.io/kubernetes/pkg/registry/rbac/clusterrole"

View File

@@ -61,6 +61,7 @@ type AuthorizerAdapter struct {
Registry Registry
}
// GetClusterRole returns the corresponding ClusterRole by name
func (a AuthorizerAdapter) GetClusterRole(name string) (*rbacv1.ClusterRole, error) {
return a.Registry.GetClusterRole(genericapirequest.NewContext(), name, &metav1.GetOptions{})
}

View File

@@ -34,7 +34,7 @@ type strategy struct {
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.
var Strategy = strategy{legacyscheme.Scheme, names.SimpleNameGenerator}