cmd

package
v0.0.0-...-3e25eef Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 27, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DecorateConfig = decorate.Config{}
	DecorateCmd    = &cobra.Command{
		Use:     "decorate",
		Short:   "Rely on the decorator pattern to encapsulate the function call standardized log",
		Long:    ``,
		Example: `igen decorate --help`,
		PersistentPreRunE: func(cmd *cobra.Command, args []string) error {
			return nil
		},
		RunE: func(cmd *cobra.Command, args []string) error {
			d := decorate.Default(DecorateConfig)
			d.Decorate()
			return nil
		},
	}
)
View Source
var (
	ShowVersion bool
	RootCmd     = &cobra.Command{
		Use:     "igen",
		Short:   "",
		Long:    ``,
		Example: `igen --help`,
		PersistentPreRunE: func(cmd *cobra.Command, args []string) error {
			return nil
		},
		RunE: func(cmd *cobra.Command, args []string) error {
			if ShowVersion {
				showVersion()
			}
			return nil
		},
	}
)
View Source
var (
	VersionCmd = &cobra.Command{
		Use:     "version",
		Short:   "",
		Long:    ``,
		Example: `igen version`,
		PersistentPreRunE: func(cmd *cobra.Command, args []string) error {
			return nil
		},
		RunE: func(cmd *cobra.Command, args []string) error {
			showVersion()
			return nil
		},
	}
)

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL