@@ -541,91 +541,91 @@ func TestLifecycleHooks(t *testing.T) {
541541 LifecycleHooks : []ContainerLifecycleHooks {
542542 {
543543 PreCreates : []ContainerRequestHook {
544- func (ctx context.Context , req ContainerRequest ) error {
544+ func (_ context.Context , _ ContainerRequest ) error {
545545 prints = append (prints , "pre-create hook 1" )
546546 return nil
547547 },
548- func (ctx context.Context , req ContainerRequest ) error {
548+ func (_ context.Context , _ ContainerRequest ) error {
549549 prints = append (prints , "pre-create hook 2" )
550550 return nil
551551 },
552552 },
553553 PostCreates : []ContainerHook {
554- func (ctx context.Context , c Container ) error {
554+ func (_ context.Context , _ Container ) error {
555555 prints = append (prints , "post-create hook 1" )
556556 return nil
557557 },
558- func (ctx context.Context , c Container ) error {
558+ func (_ context.Context , _ Container ) error {
559559 prints = append (prints , "post-create hook 2" )
560560 return nil
561561 },
562562 },
563563 PreStarts : []ContainerHook {
564- func (ctx context.Context , c Container ) error {
564+ func (_ context.Context , _ Container ) error {
565565 prints = append (prints , "pre-start hook 1" )
566566 return nil
567567 },
568- func (ctx context.Context , c Container ) error {
568+ func (_ context.Context , _ Container ) error {
569569 prints = append (prints , "pre-start hook 2" )
570570 return nil
571571 },
572572 },
573573 PostStarts : []ContainerHook {
574- func (ctx context.Context , c Container ) error {
574+ func (_ context.Context , _ Container ) error {
575575 prints = append (prints , "post-start hook 1" )
576576 return nil
577577 },
578- func (ctx context.Context , c Container ) error {
578+ func (_ context.Context , _ Container ) error {
579579 prints = append (prints , "post-start hook 2" )
580580 return nil
581581 },
582582 },
583583 PostReadies : []ContainerHook {
584- func (ctx context.Context , c Container ) error {
584+ func (_ context.Context , _ Container ) error {
585585 prints = append (prints , "post-ready hook 1" )
586586 return nil
587587 },
588- func (ctx context.Context , c Container ) error {
588+ func (_ context.Context , _ Container ) error {
589589 prints = append (prints , "post-ready hook 2" )
590590 return nil
591591 },
592592 },
593593 PreStops : []ContainerHook {
594- func (ctx context.Context , c Container ) error {
594+ func (_ context.Context , _ Container ) error {
595595 prints = append (prints , "pre-stop hook 1" )
596596 return nil
597597 },
598- func (ctx context.Context , c Container ) error {
598+ func (_ context.Context , _ Container ) error {
599599 prints = append (prints , "pre-stop hook 2" )
600600 return nil
601601 },
602602 },
603603 PostStops : []ContainerHook {
604- func (ctx context.Context , c Container ) error {
604+ func (_ context.Context , _ Container ) error {
605605 prints = append (prints , "post-stop hook 1" )
606606 return nil
607607 },
608- func (ctx context.Context , c Container ) error {
608+ func (_ context.Context , _ Container ) error {
609609 prints = append (prints , "post-stop hook 2" )
610610 return nil
611611 },
612612 },
613613 PreTerminates : []ContainerHook {
614- func (ctx context.Context , c Container ) error {
614+ func (_ context.Context , _ Container ) error {
615615 prints = append (prints , "pre-terminate hook 1" )
616616 return nil
617617 },
618- func (ctx context.Context , c Container ) error {
618+ func (_ context.Context , _ Container ) error {
619619 prints = append (prints , "pre-terminate hook 2" )
620620 return nil
621621 },
622622 },
623623 PostTerminates : []ContainerHook {
624- func (ctx context.Context , c Container ) error {
624+ func (_ context.Context , _ Container ) error {
625625 prints = append (prints , "post-terminate hook 1" )
626626 return nil
627627 },
628- func (ctx context.Context , c Container ) error {
628+ func (_ context.Context , _ Container ) error {
629629 prints = append (prints , "post-terminate hook 2" )
630630 return nil
631631 },
@@ -714,13 +714,13 @@ func TestCombineLifecycleHooks(t *testing.T) {
714714 prints := []string {}
715715
716716 preCreateFunc := func (prefix string , hook string , lifecycleID int , hookID int ) func (ctx context.Context , req ContainerRequest ) error {
717- return func (ctx context.Context , _ ContainerRequest ) error {
717+ return func (_ context.Context , _ ContainerRequest ) error {
718718 prints = append (prints , fmt .Sprintf ("[%s] pre-%s hook %d.%d" , prefix , hook , lifecycleID , hookID ))
719719 return nil
720720 }
721721 }
722722 hookFunc := func (prefix string , hookType string , hook string , lifecycleID int , hookID int ) func (ctx context.Context , c Container ) error {
723- return func (ctx context.Context , _ Container ) error {
723+ return func (_ context.Context , _ Container ) error {
724724 prints = append (prints , fmt .Sprintf ("[%s] %s-%s hook %d.%d" , prefix , hookType , hook , lifecycleID , hookID ))
725725 return nil
726726 }
@@ -975,19 +975,19 @@ func lifecycleHooksIsHonouredFn(t *testing.T, prints []string) {
975975
976976func Test_combineContainerHooks (t * testing.T ) {
977977 var funcID string
978- defaultContainerRequestHook := func (ctx context.Context , req ContainerRequest ) error {
978+ defaultContainerRequestHook := func (_ context.Context , _ ContainerRequest ) error {
979979 funcID = "defaultContainerRequestHook"
980980 return nil
981981 }
982- userContainerRequestHook := func (ctx context.Context , req ContainerRequest ) error {
982+ userContainerRequestHook := func (_ context.Context , _ ContainerRequest ) error {
983983 funcID = "userContainerRequestHook"
984984 return nil
985985 }
986- defaultContainerHook := func (ctx context.Context , container Container ) error {
986+ defaultContainerHook := func (_ context.Context , _ Container ) error {
987987 funcID = "defaultContainerHook"
988988 return nil
989989 }
990- userContainerHook := func (ctx context.Context , container Container ) error {
990+ userContainerHook := func (_ context.Context , _ Container ) error {
991991 funcID = "userContainerHook"
992992 return nil
993993 }
0 commit comments