@@ -2,7 +2,6 @@ package hncconfig_test
22
33import (
44 "context"
5- "errors"
65 "fmt"
76 "testing"
87 "time"
@@ -454,6 +453,7 @@ func setTypeConfig(ctx context.Context, group, resource string, mode api.Synchro
454453
455454// updateTypeConfig is like setTypeConfig but it doesn't wait to confirm that the change was
456455// successful.
456+ //lint:ignore U1000 Ignore for now, as it may be used again in the future
457457func updateTypeConfig (ctx context.Context , group , resource string , mode api.SynchronizationMode ) {
458458 updateTypeConfigWithOffset (ctx , 1 , group , resource , mode )
459459}
@@ -483,6 +483,7 @@ func updateTypeConfigWithOffset(ctx context.Context, offset int, group, resource
483483 }).Should (Succeed (), "While updating type config for %s/%s to %s" , group , resource , mode )
484484}
485485
486+ //lint:ignore U1000 Ignore for now, as it may be used again in the future
486487func unsetTypeConfig (ctx context.Context , group , resource string ) {
487488 removeTypeConfigWithOffset (1 , ctx , group , resource )
488489 Eventually (typeStatusMode (ctx , group , resource )).Should (Equal (testModeMisssing ))
@@ -580,11 +581,11 @@ func getNumPropagatedObjects(ctx context.Context, group, resource string) func()
580581 if t .NumPropagatedObjects != nil {
581582 return * t .NumPropagatedObjects , nil
582583 }
583- return - 1 , errors . New ( fmt .Sprintf ("NumPropagatedObjects field is not set for " +
584- "group %s, resource %s" , group , resource ))
584+ return - 1 , fmt .Errorf ("NumPropagatedObjects field is not set for " +
585+ "group %s, resource %s" , group , resource )
585586 }
586587 }
587- return - 1 , errors . New ( fmt .Sprintf ("group %s, resource %s is not found in status" , group , resource ) )
588+ return - 1 , fmt .Errorf ("group %s, resource %s is not found in status" , group , resource )
588589 }
589590}
590591
@@ -601,7 +602,7 @@ func hasNumSourceObjects(ctx context.Context, group, resource string) func() (bo
601602 return t .NumSourceObjects != nil , nil
602603 }
603604 }
604- return false , errors . New ( fmt .Sprintf ("group %s, resource %s is not found in status" , group , resource ) )
605+ return false , fmt .Errorf ("group %s, resource %s is not found in status" , group , resource )
605606 }
606607}
607608
@@ -618,10 +619,10 @@ func getNumSourceObjects(ctx context.Context, group, resource string) func() (in
618619 if t .NumSourceObjects != nil {
619620 return * t .NumSourceObjects , nil
620621 }
621- return - 1 , errors . New ( fmt .Sprintf ("NumSourceObjects field is not set for " +
622- "group %s, resource %s" , group , resource ))
622+ return - 1 , fmt .Errorf ("NumSourceObjects field is not set for " +
623+ "group %s, resource %s" , group , resource )
623624 }
624625 }
625- return - 1 , errors . New ( fmt .Sprintf ("group %s, resource %s is not found in status" , group , resource ) )
626+ return - 1 , fmt .Errorf ("group %s, resource %s is not found in status" , group , resource )
626627 }
627628}
0 commit comments