1
0
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:
Carlos Alexandro Becker 2017-12-30 10:16:54 -02:00
parent f537091757
commit 60eb9d5f22
No known key found for this signature in database
GPG Key ID: E61E2F7DC14AB940

View File

@ -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 {