chore: work save

This commit is contained in:
Marcel S. Henselin 2026-01-29 10:05:13 +01:00
parent 3e3f13d36d
commit 9752d63f7e
19 changed files with 1003 additions and 209 deletions

View file

@ -4,29 +4,23 @@ import (
"log"
"os"
"github.com/mhenselin/terraform-provider-stackitprivatepreview/tools"
"github.com/spf13/cobra"
"github.com/mhenselin/terraform-provider-stackitprivatepreview/cmd/cmd"
)
func NewRootCmd() *cobra.Command {
cmd := &cobra.Command{
Use: "builder",
Short: "...",
Long: "...",
SilenceErrors: true, // Error is beautified in a custom way before being printed
SilenceUsage: true,
DisableAutoGenTag: true,
RunE: func(_ *cobra.Command, _ []string) error {
return tools.Build()
},
}
cmd.SetOut(os.Stdout)
return cmd
}
func main() {
cmd := NewRootCmd()
err := cmd.Execute()
rootCmd := cmd.NewRootCmd()
//rootCmd.PersistentFlags().StringVar(&cfgFile, "config", "", "config file (default is $HOME/.cobra.yaml)")
//rootCmd.PersistentFlags().StringP("author", "a", "YOUR NAME", "author name for copyright attribution")
//rootCmd.PersistentFlags().StringVarP(&userLicense, "license", "l", "", "name of license for the project")
rootCmd.SetOut(os.Stdout)
rootCmd.AddCommand(
cmd.NewBuildCmd(),
cmd.NewPublishCmd(),
)
err := rootCmd.Execute()
if err != nil {
log.Fatal(err)
}