From ade38745bc48e21b5143c448c1434189ef7a0bd0 Mon Sep 17 00:00:00 2001 From: albert Date: Thu, 17 Oct 2024 18:57:11 +0200 Subject: [PATCH] register --- cmd/register.go | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 cmd/register.go diff --git a/cmd/register.go b/cmd/register.go new file mode 100644 index 0000000..006ce99 --- /dev/null +++ b/cmd/register.go @@ -0,0 +1,35 @@ +/* +Copyright © 2024 NAME HERE +*/ +package cmd + +import ( + "fmt" + + "github.com/spf13/cobra" +) + +// registerCmd represents the register command +var registerCmd = &cobra.Command{ + Use: "register", + Short: "A brief description of your command", + Long: `A longer description that spans multiple lines and likely contains examples +and usage of using your command. For example: + +Cobra is a CLI library for Go that empowers applications. +This application is a tool to generate the needed files +to quickly create a Cobra application.`, + Run: func(cmd *cobra.Command, args []string) { + fmt.Println("register called") + }, +} + +func init() { + rootCmd.AddCommand(registerCmd) + + registerCmd.Flags().String("sap-addr", ":3000", "nats.io broker host address") + + registerCmd.Flags().String("nats-host", "nats", "nats.io broker host address") + registerCmd.Flags().Int("nats-port", 4222, "nats.io broker tcp port") + registerCmd.Flags().String("log-level", "debug", "log level trace") +}