Rename strutil to stringsx, use wg.Go

Address PR review feedback: rename the shared string-helper package
from strutil to stringsx to avoid the discouraged util suffix and the
collision with the standard strings package, updating all import paths
and call sites.

Replace the manual wg.Add/wg.Done bookkeeping in the enrichment worker
with wg.Go, which is less error-prone.

Signed-off-by: Émile Ré <emile@probo.com>
This commit is contained in:
Émile Ré
2026-06-12 12:48:39 +02:00
parent 5e6478aa09
commit 01cd58cba4
5 changed files with 19 additions and 27 deletions

View File

@@ -299,25 +299,17 @@ func (h *enrichmentHandler) Process(ctx context.Context, party coredata.CommonTh
var wg sync.WaitGroup
wg.Add(3)
go func() {
defer wg.Done()
wg.Go(func() {
compliance, complianceErr = h.runComplianceDocs(ctx, party.Name, website, legalName)
}()
go func() {
defer wg.Done()
})
wg.Go(func() {
domainsResult, domainsErr = h.runDomains(ctx, party.Name, website)
}()
go func() {
defer wg.Done()
})
wg.Go(func() {
logoFile = h.prepareLogo(ctx, party, website)
}()
})
wg.Wait()

View File

@@ -18,7 +18,7 @@ import (
"slices"
"strings"
"go.probo.inc/probo/pkg/strutil"
"go.probo.inc/probo/pkg/stringsx"
"go.probo.inc/probo/pkg/uri"
)
@@ -158,7 +158,7 @@ func vendorLabels(name, website string) []string {
}
add(uri.DomainLabel(website))
add(strutil.NormalizeAlnum(name))
add(stringsx.NormalizeAlnum(name))
return labels
}