@@ -728,7 +728,7 @@ func TestDo(t *testing.T) {
728
728
lockErr := make (chan error , 1 )
729
729
go func () {
730
730
defer wg .Done ()
731
- err = c .Do (context .Background (), name , func (ctx context.Context , l * pglock.Lock ) error {
731
+ err = c .Do (context .Background (), name , func (ctx context.Context , _ * pglock.Lock ) error {
732
732
once := make (chan struct {}, 1 )
733
733
once <- struct {}{}
734
734
for {
@@ -772,7 +772,7 @@ func TestDo(t *testing.T) {
772
772
if err != nil {
773
773
t .Fatal ("cannot create lock client:" , err )
774
774
}
775
- err = c .Do (context .Background (), name , func (ctx context.Context , l * pglock.Lock ) error {
775
+ err = c .Do (context .Background (), name , func (context.Context , * pglock.Lock ) error {
776
776
for i := 0 ; i < 5 ; i ++ {
777
777
t .Log ("i = " , i )
778
778
time .Sleep (1 * time .Second )
@@ -799,7 +799,7 @@ func TestDo(t *testing.T) {
799
799
}
800
800
ctx , cancel := context .WithCancel (context .Background ())
801
801
cancel ()
802
- err = c .Do (ctx , name , func (ctx context.Context , l * pglock.Lock ) error {
802
+ err = c .Do (ctx , name , func (context.Context , * pglock.Lock ) error {
803
803
return nil
804
804
})
805
805
if ! errors .Is (err , pglock .ErrNotAcquired ) {
@@ -822,7 +822,7 @@ func TestDo(t *testing.T) {
822
822
}
823
823
ctx , cancel := context .WithTimeout (context .Background (), 2 * time .Second )
824
824
defer cancel ()
825
- err = c .Do (context .Background (), name , func (ctx context.Context , l * pglock.Lock ) error {
825
+ err = c .Do (context .Background (), name , func (ctx context.Context , _ * pglock.Lock ) error {
826
826
for {
827
827
if err := ctx .Err (); err != nil {
828
828
return err
@@ -852,7 +852,7 @@ func TestDo(t *testing.T) {
852
852
if _ , err := c .Acquire (name ); err != nil {
853
853
t .Fatal ("cannot grab lock:" , err )
854
854
}
855
- err = c .Do (context .Background (), name , func (ctx context.Context , l * pglock.Lock ) error {
855
+ err = c .Do (context .Background (), name , func (context.Context , * pglock.Lock ) error {
856
856
return errors .New ("should not have been executed" )
857
857
}, pglock .FailIfLocked ())
858
858
if ! errors .Is (err , pglock .ErrNotAcquired ) {
@@ -861,7 +861,7 @@ func TestDo(t *testing.T) {
861
861
if _ , err := c .Acquire (name ); err != nil {
862
862
t .Fatal ("cannot grab lock:" , err )
863
863
}
864
- err = c .Do (context .Background (), name , func (ctx context.Context , l * pglock.Lock ) error {
864
+ err = c .Do (context .Background (), name , func (context.Context , * pglock.Lock ) error {
865
865
for i := 0 ; i < 5 ; i ++ {
866
866
t .Log ("i = " , i )
867
867
time .Sleep (1 * time .Second )
0 commit comments