You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
568 B
23 lines
568 B
package add
|
|
|
|
import (
|
|
"git.devices.local/mawas/golang-api-skeleton/cmd/add/admin"
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
func Command(appName string, cfgFile string, flagCfg map[string]interface{}) *cobra.Command {
|
|
cmd := &cobra.Command{
|
|
Use: "add",
|
|
Short: "Allows to add items",
|
|
Long: "Allows to add items",
|
|
// SilenceUsage: true,
|
|
// SilenceErrors: true,
|
|
DisableAutoGenTag: true,
|
|
RunE: func(cmd *cobra.Command, args []string) error {
|
|
err := cmd.Help()
|
|
return err
|
|
},
|
|
}
|
|
cmd.AddCommand(admin.Command(appName, cfgFile, flagCfg))
|
|
return cmd
|
|
}
|