mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-01-08 03:31:59 +02:00
style: simplified code
This commit is contained in:
parent
f537091757
commit
60eb9d5f22
@ -35,11 +35,7 @@ func New() *Handler {
|
||||
// if a SIGTERM or SIGINT is received and of course if the task itself fails.
|
||||
func (h *Handler) Run(ctx context.Context, task Task) error {
|
||||
go func() {
|
||||
if err := task(); err != nil {
|
||||
h.errs <- err
|
||||
return
|
||||
}
|
||||
h.errs <- nil
|
||||
h.errs <- task()
|
||||
}()
|
||||
signal.Notify(h.signals, syscall.SIGINT, syscall.SIGTERM)
|
||||
select {
|
||||
|
Loading…
Reference in New Issue
Block a user