repositorypackage
1.2.0
Repository: https://github.com/payfazz/go-mainrun.git
Documentation: pkg.go.dev
# README
go-mainrun
Utility for main package
How to use
func main() { mainrun.Run(run) }
func run(ctx context.Context) error {
// ...
return nil
}
The ctx
passed to run will be cancelled if the program caught os signal
(graceful shutdown).
The returned error
will be printed to stderr
and the program will be exit
with exit code 1