Skip to content

Commit

Permalink
defer
Browse files Browse the repository at this point in the history
  • Loading branch information
go-to-k committed Jan 29, 2025
1 parent 6ae208d commit 1dd33f4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions internal/wrapper/s3_tables_wrapper.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ func (s *S3TablesWrapper) ClearBucket(
wg := sync.WaitGroup{}
wg.Add(1)
go func() {
defer wg.Done()
for range progressCh {
count := deletedTablesCount.Add(1)
if !input.QuietMode {
Expand Down
2 changes: 1 addition & 1 deletion internal/wrapper/s3_tables_wrapper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -663,10 +663,10 @@ func TestS3TablesWrapper_deleteNamespace(t *testing.T) {
wg := sync.WaitGroup{}
wg.Add(1)
go func() {
defer wg.Done()
for range progressCh {
deletedCount.Add(1)
}
wg.Done()
}()

err := s3Tables.deleteNamespace(tt.args.ctx, tt.args.bucketArn, tt.args.bucketName, tt.args.namespace, progressCh)
Expand Down

0 comments on commit 1dd33f4

Please sign in to comment.