register
This commit is contained in:
parent
e4739d572f
commit
ade38745bc
35
cmd/register.go
Normal file
35
cmd/register.go
Normal file
@ -0,0 +1,35 @@
|
||||
/*
|
||||
Copyright © 2024 NAME HERE <EMAIL ADDRESS>
|
||||
*/
|
||||
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")
|
||||
}
|
Loading…
Reference in New Issue
Block a user