erm/app/darktile/cmd/execute.go

19 lines
254 B
Go

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
}