mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 11:50:44 +00:00
fix golint failures of pkg/registry/rbac/role
This commit is contained in:
parent
55d1b5e3d4
commit
538776d6ad
@ -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
|
||||
|
@ -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"
|
||||
|
@ -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{})
|
||||
}
|
||||
|
@ -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}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user