erm/app/darktile/cmd/execute.go
2023-01-15 20:55:18 -06:00

20 lines
312 B
Go

package cmd
import (
"context"
"github.com/alecthomas/kong"
)
func Execute(ctx context.Context) int {
var cli Root
pst := kong.Parse(&cli)
// Call the Run() method of the selected parsed command.
err := pst.Run(&Context{Context: ctx})
if err != nil {
pst.FatalIfErrorf(err)
return 1
}
return 0
}