File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -649,8 +649,7 @@ func (*TestDefaultValidatorList) DeepCopyObject() runtime.Object { return nil
649
649
type TestCustomDefaulter struct {}
650
650
651
651
func (* TestCustomDefaulter ) Default (ctx context.Context , obj runtime.Object ) error {
652
- log := logf .FromContext (ctx )
653
- log .Info ("Defaulting object" )
652
+ logf .FromContext (ctx ).Info ("Defaulting object" )
654
653
req , err := admission .RequestFromContext (ctx )
655
654
if err != nil {
656
655
return fmt .Errorf ("expected admission.Request in ctx: %w" , err )
@@ -676,8 +675,7 @@ var _ admission.CustomDefaulter = &TestCustomDefaulter{}
676
675
type TestMutationHandler struct {}
677
676
678
677
func (* TestMutationHandler ) Handle (ctx context.Context , req admission.Request ) admission.Response {
679
- log := logf .FromContext (ctx )
680
- log .Info ("Mutating object" )
678
+ logf .FromContext (ctx ).Info ("Mutating object" )
681
679
return admission.Response {
682
680
AdmissionResponse : admissionv1.AdmissionResponse {
683
681
Allowed : true ,
You can’t perform that action at this time.
0 commit comments