git-roast/cmd/init.go
2025-01-05 06:30:54 +01:00

25 lines
393 B
Go

package cmd
import (
"fmt"
"git-roast/internal/roast"
"os"
"github.com/spf13/cobra"
)
var initCmd = &cobra.Command{
Use: "init",
Short: "Initialize a new git-roast repository.",
Run: func(cmd *cobra.Command, args []string) {
if err := roast.Init(); err != nil {
_, _ = fmt.Fprintln(os.Stderr, err.Error())
os.Exit(1)
}
},
}
func init() {
rootCmd.AddCommand(initCmd)
}