
Security News
npm Adopts OIDC for Trusted Publishing in CI/CD Workflows
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
github.com/jimyj/go-queue
go-queue is task queue for concurrency(go-queue 是一个通用的并发通道,可以自定义同时并发数和自定义并发任务)
go get github.com/JimYJ/go-queue
import:
import "github.com/JimYJ/go-queue"
init and use:
func main() {
queue.Debug() // show log
queue.InitQueue(2, true, true) // frist param means max concurrent.
// if second param is true,means main goroutine will wait that all queue done.
// if third param is true, means every error or timeout will retry 3 times.
queue.SetConcurrentInterval(1 * time.Millisecond) // set interval time for each concurrent, default 0
for i := 0; i < 10; i++ {
job := new(queue.Job)
job.ID = int64(i)
job.FuncQueue = youfunc
job.Payload = []interface{}{100, 50}
queue.Push(job)
}
queue.Done()
log.Println(queue.FailList)
}
func youfunc(value ...interface{}) error { //you func must meet type Func func(value ...interface{})error
//dosomething
return errors.New("error info")
}
FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
Research
/Security News
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.