Merge pull request #76765 from SataQiu/fix-golint-apis-20190418

Fix golint failures of pkg/apis/authorization
This commit is contained in:
Kubernetes Prow Robot 2019-04-23 22:10:00 -07:00 committed by GitHub
commit 2a3d307fb9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 3 deletions

View File

@ -14,7 +14,6 @@ pkg/apis/apps/v1beta2
pkg/apis/apps/validation
pkg/apis/auditregistration/v1alpha1
pkg/apis/authentication/v1
pkg/apis/authorization
pkg/apis/authorization/v1
pkg/apis/authorization/validation
pkg/apis/autoscaling

View File

@ -38,8 +38,10 @@ func Resource(resource string) schema.GroupResource {
}
var (
// SchemeBuilder points to a list of functions added to Scheme.
SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
AddToScheme = SchemeBuilder.AddToScheme
// AddToScheme applies all the stored functions to the scheme.
AddToScheme = SchemeBuilder.AddToScheme
)
func addKnownTypes(scheme *runtime.Scheme) error {

View File

@ -138,7 +138,7 @@ type SelfSubjectAccessReviewSpec struct {
NonResourceAttributes *NonResourceAttributes
}
// SubjectAccessReviewStatus
// SubjectAccessReviewStatus represents the current state of a SubjectAccessReview.
type SubjectAccessReviewStatus struct {
// Allowed is required. True if the action would be allowed, false otherwise.
Allowed bool
@ -177,6 +177,7 @@ type SelfSubjectRulesReview struct {
Status SubjectRulesReviewStatus
}
// SelfSubjectRulesReviewSpec defines the specification for SelfSubjectRulesReview.
type SelfSubjectRulesReviewSpec struct {
// Namespace to evaluate rules for. Required.
Namespace string