Documentation
¶
Overview ¶
Copyright © 2024 NAME HERE <EMAIL ADDRESS>
Copyright © 2024 NAME HERE <EMAIL ADDRESS>
Index ¶
- func AddUsageTemplateFunc(name string, f interface{})
- func EnableUsageTemplating(cmds ...*cobra.Command)
- func Execute()
- func RegisterFlags(flags *pflag.FlagSet)
- func TemplateCommandField(cmd *cobra.Command, field string) (string, error)
- type Handler
- func (h *Handler) GenerateRegistry(ctx context.Context) *registry.Base
- func (h *Handler) NewMigratDown() *cobra.Command
- func (h *Handler) NewMigratUp() *cobra.Command
- func (h *Handler) NewMigrate() *cobra.Command
- func (h *Handler) NewRootCmd() *cobra.Command
- func (h *Handler) NewServer() *cobra.Command
- func (h *Handler) NewServerStart() *cobra.Command
- func (h *Handler) NewUser() *cobra.Command
- func (h *Handler) RegisterCommandRecursive(parent *cobra.Command)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddUsageTemplateFunc ¶
func AddUsageTemplateFunc(name string, f interface{})
AddUsageTemplateFunc adds a template function to the usage template.
func EnableUsageTemplating ¶
EnableUsageTemplating enables gotemplates for usage strings, i.e. cmd.Short, cmd.Long, and cmd.Example. The data for the template is the command itself. Especially useful are `.Root.Name` and `.CommandPath`. This will be inherited by all subcommands, so enabling it on the root command is sufficient.
func Execute ¶
func Execute()
Execute adds all child commands to the root command sets flags appropriately.
func RegisterFlags ¶
Types ¶
type Handler ¶
type Handler struct { }
func NewHandler ¶
func NewHandler() *Handler
func (*Handler) GenerateRegistry ¶
func (*Handler) NewMigratDown ¶
func (*Handler) NewMigratUp ¶
func (*Handler) NewMigrate ¶
func (*Handler) NewRootCmd ¶
func (*Handler) NewServerStart ¶
func (*Handler) RegisterCommandRecursive ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.