chore: upgrade go 1.25 (#22904)

This commit is contained in:
andig 2025-08-14 16:21:54 +02:00 • committed by GitHub
parent 536e01459a
commit 6f03177a54
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 26 additions and 45 deletions

View file

@ -11,26 +11,21 @@ import (
"github.com/jeremywohl/flatten"
)
func workers(log *util.Logger, num int, tasks <-chan string, hits chan<- []tasks.Result) *sync.WaitGroup {
func workers(log *util.Logger, num int, ips <-chan string, hits chan<- []tasks.Result) *sync.WaitGroup {
var wg sync.WaitGroup
for range num {
wg.Add(1)
go func() {
workunit(log, tasks, hits)
wg.Done()
}()
wg.Go(func() {
for ip := range ips {
res := taskList.Test(log, "", tasks.ResultDetails{IP: ip})
hits <- res
}
})
}
return &wg
}
func workunit(log *util.Logger, ips <-chan string, hits chan<- []tasks.Result) {
for ip := range ips {
res := taskList.Test(log, "", tasks.ResultDetails{IP: ip})
hits <- res
}
}
func Work(log *util.Logger, num int, hosts []string) []tasks.Result {
ip := make(chan string)
hits := make(chan []tasks.Result)