mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-01-10 03:47:03 +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.
|
// 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 {
|
func (h *Handler) Run(ctx context.Context, task Task) error {
|
||||||
go func() {
|
go func() {
|
||||||
if err := task(); err != nil {
|
h.errs <- task()
|
||||||
h.errs <- err
|
|
||||||
return
|
|
||||||
}
|
|
||||||
h.errs <- nil
|
|
||||||
}()
|
}()
|
||||||
signal.Notify(h.signals, syscall.SIGINT, syscall.SIGTERM)
|
signal.Notify(h.signals, syscall.SIGINT, syscall.SIGTERM)
|
||||||
select {
|
select {
|
||||||
|
Loading…
Reference in New Issue
Block a user