erm/app/darktile/cmd/execute.go

19 lines
254 B
Go
Raw Permalink Normal View History

2023-01-16 02:55:18 +00:00
package cmd
import (
"context"
"github.com/alecthomas/kong"
)
func Execute(ctx context.Context) int {
var cli Root
pst := kong.Parse(&cli)
err := pst.Run(&Context{Context: ctx})
if err != nil {
pst.FatalIfErrorf(err)
return 1
}
return 0
}