git-roast/cmd/root.go

30 lines
484 B
Go
Raw Permalink Normal View History

2025-01-05 06:30:54 +01:00
package cmd
import (
"git-roast/internal/config"
"os"
"runtime/debug"
"github.com/spf13/cobra"
)
var rootCmd = &cobra.Command{
Use: "git-roast",
Short: "Decentralized code review platform.",
}
func Execute() {
err := rootCmd.Execute()
if err != nil {
os.Exit(1)
}
}
func init() {
if info, ok := debug.ReadBuildInfo(); ok {
rootCmd.Version = info.Main.Version
}
rootCmd.PersistentFlags().BoolVar(&config.Verbose, "verbose", false, "verbose output to stdout")
}