git-ea/main.go

38 lines
686 B
Go
Raw Normal View History

package main
import (
"context"
"os"
"go.jolheiser.com/git-ea/cmd"
"github.com/peterbourgon/ff/v3/ffcli"
"github.com/rs/zerolog"
"github.com/rs/zerolog/log"
)
var Version = "x.y.z"
func main() {
log.Logger = log.Output(zerolog.ConsoleWriter{Out: os.Stderr})
c := &ffcli.Command{
Name: "ea",
ShortUsage: "ea <cmd>",
ShortHelp: "ea is the base command",
Subcommands: []*ffcli.Command{
cmd.Backport,
cmd.Branch,
cmd.Frontport,
},
Exec: func(_ context.Context, _ []string) error {
log.Info().Msgf("git-ea v%s", Version)
return nil
},
}
if err := c.ParseAndRun(context.Background(), os.Args[1:]); err != nil {
log.Err(err).Msg("")
}
}