mirror of
https://github.com/onyx-and-iris/gignore.git
synced 2025-03-31 10:51:19 +01:00
add prune task to Taskfile
This commit is contained in:
parent
eaf091dc1a
commit
7ada4e9328
@ -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'
|
||||
|
@ -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:
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user