A tiny execution wrapper for programs that run safely and shutdown gracefully (if possible)
go get github.com/drgomesp/executtor
package main
import (
"context"
"log"
x "github.com/drgomesp/execcutor"
)
func main() {
// Run returns an error which you can capture and handle
_ = x.Run(func(ctx context.Context, args ...string) error {
// and the program runs here
return nil
})
}
See examples/
Built by Daniel Ribeiro.