Fix wrong type for printf
@@ -112,7 +112,7 @@ func (q *restrictUsersAdmission) Admit(a admission.Attributes) (err error) {
rolebinding, ok := obj.(*authorizationapi.RoleBinding)
if !ok {
return admission.NewForbidden(a,
- fmt.Errorf("wrong object type for new rolebinding: %t", obj))
+ fmt.Errorf("wrong object type for new rolebinding: %T", obj))
}
subjects = rolebinding.Subjects
@@ -124,7 +124,7 @@ func (q *restrictUsersAdmission) Admit(a admission.Attributes) (err error) {
oldrolebinding, ok := oldObj.(*authorizationapi.RoleBinding)
if !ok {
return admission.NewForbidden(a,
- fmt.Errorf("wrong object type for old rolebinding: %t", oldObj))
+ fmt.Errorf("wrong object type for old rolebinding: %T", oldObj))
}
oldSubjects = oldrolebinding.Subjects
@@ -137,7 +137,7 @@ func (q *restrictUsersAdmission) Admit(a admission.Attributes) (err error) {
policybinding, ok := obj.(*authorizationapi.PolicyBinding)
if !ok {
return admission.NewForbidden(a,
- fmt.Errorf("wrong object type for new policybinding: %t", obj))
+ fmt.Errorf("wrong object type for new policybinding: %T", obj))
}
for _, rolebinding := range policybinding.RoleBindings {
@@ -151,7 +151,7 @@ func (q *restrictUsersAdmission) Admit(a admission.Attributes) (err error) {
oldpolicybinding, ok := oldObj.(*authorizationapi.PolicyBinding)
if !ok {
return admission.NewForbidden(a,
- fmt.Errorf("wrong object type for old policybinding: %t", oldObj))
+ fmt.Errorf("wrong object type for old policybinding: %T", oldObj))
}
for _, rolebinding := range oldpolicybinding.RoleBindings {
