remove the done channel
Some checks are pending
CI / Lint (push) Waiting to run

add prune task to Taskfile
This commit is contained in:
onyx-and-iris 2025-03-12 21:03:52 +00:00
parent eaf091dc1a
commit 7ada4e9328
2 changed files with 7 additions and 5 deletions

View File

@ -64,3 +64,8 @@ tasks:
desc: Clean the build artifacts
cmds:
- '{{.SHELL}} rm -r {{.BIN_DIR}}'
prune:
desc: Empty the gitignoreio template registry
cmds:
- '{{.SHELL}} rm internal/registry/templates/gitignoreio/*.gitignore'

View File

@ -21,7 +21,6 @@ func main() {
}
errChan := make(chan error)
doneChan := make(chan struct{})
for _, template := range templates {
go func() {
@ -30,15 +29,13 @@ func main() {
errChan <- fmt.Errorf("Failed to create template %s: %v", template.Name, err)
return
}
doneChan <- struct{}{}
errChan <- nil
}()
}
for range templates {
select {
case err := <-errChan:
if err := <-errChan; err != nil {
log.Error(err)
case <-doneChan:
}
}
}