drawio-export/pkg/drawio/execution.go
Алексей Бадяев 8d18d7291e
All checks were successful
drawio-export/pipeline/head This commit looks good
Автоматическая сборка пакетов Debian (#4)
This PR closes #2

Reviewed-on: #4
2023-04-12 22:37:54 +07:00

21 lines
340 B
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package drawio
import (
"errors"
"os/exec"
)
// Последовательный запуск команд в ОС
func RunSequence(command ...*exec.Cmd) error {
var (
errs = []error{}
err error
)
for _, cmd := range command {
if err = cmd.Run(); err != nil {
errs = append(errs, err)
}
}
return errors.Join(errs...)
}