chore: work save
This commit is contained in:
parent
3e3f13d36d
commit
9752d63f7e
19 changed files with 1003 additions and 209 deletions
34
cmd/main.go
34
cmd/main.go
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue