use the new wg.Go() function

This commit is contained in:
2026-07-13 12:33:04 +02:00
parent 05ac8eb870
commit 3a75ad847b
3 changed files with 36 additions and 14 deletions

View File

@@ -19,7 +19,6 @@ package es
import (
"context"
"fmt"
"sync"
"codeberg.org/scip/esctl/pkg/cfg"
"github.com/elastic/go-elasticsearch/v9"
@@ -64,10 +63,8 @@ type apiResponse struct {
func getApiData(
conf *cfg.Config,
es *elasticsearch.TypedClient,
wg *sync.WaitGroup,
reschan chan apiResponse,
which string) {
defer wg.Done()
apiRes := apiResponse{}