fix golint failures of pkg/registry/rbac/role

This commit is contained in:
SataQiu 2019-04-24 16:52:27 +08:00
parent 55d1b5e3d4
commit 538776d6ad
4 changed files with 3 additions and 3 deletions

View File

@ -293,7 +293,6 @@ pkg/registry/rbac/clusterrolebinding
pkg/registry/rbac/clusterrolebinding/policybased
pkg/registry/rbac/reconciliation
pkg/registry/rbac/rest
pkg/registry/rbac/role
pkg/registry/rbac/role/policybased
pkg/registry/rbac/rolebinding
pkg/registry/rbac/rolebinding/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 role provides Registry interface and its RESTStorage
// implementation for storing Role objects.
package role // import "k8s.io/kubernetes/pkg/registry/rbac/role"

View File

@ -61,6 +61,7 @@ type AuthorizerAdapter struct {
Registry Registry
}
// GetRole returns the corresponding Role by name in specified namespace
func (a AuthorizerAdapter) GetRole(namespace, name string) (*rbacv1.Role, error) {
return a.Registry.GetRole(genericapirequest.WithNamespace(genericapirequest.NewContext(), namespace), 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
// Role objects.
var Strategy = strategy{legacyscheme.Scheme, names.SimpleNameGenerator}