Documentation ¶
Index ¶
- Constants
- Variables
- func ArgsWithDefaultErrorFunc(arg cobra.PositionalArgs) cobra.PositionalArgs
- func ArgsWithErrorFunc(arg cobra.PositionalArgs, errFunc func(cmd *cobra.Command, err error) error) cobra.PositionalArgs
- func BindPFlags(vc *viper.Viper, pFlags *pflag.FlagSet) error
- func CommandPathToMarkdown(buf *bytes.Buffer, cmd *cobra.Command)
- func DefaultArgErrorFunc(cmd *cobra.Command, err error) error
- func DefaultFlagErrorFunc(cmd *cobra.Command, err error) error
- func FlagToMarkdown(buf *bytes.Buffer, vcs ...*viper.Viper) func(f *pflag.Flag)
- func GenerateMarkdown(cmd *cobra.Command, parentVc *viper.Viper, w io.Writer)
- func GetEnvKeyReplacer(vc *viper.Viper) *strings.Replacer
- func GetStringMap(f *pflag.Flag) (map[string]interface{}, error)
- func HttpResponsePrettyPrintln(w io.Writer, resp *http.Response) error
- func IsDirectory(p string) (bool, error)
- func JsonPrettyCopyAndClose(w io.Writer, r io.ReadCloser) error
- func JsonPrettyPrintln(w io.Writer, v interface{}) error
- func JsonPrettySaveFile(filename string, perm os.FileMode, v interface{}) error
- func MarkAnnotationCustom(fs *pflag.FlagSet, names ...string) error
- func MarkAnnotationHidden(fs *pflag.FlagSet, names ...string) error
- func MarkAnnotationRequired(fs *pflag.FlagSet, names ...string) error
- func NewCommand(parentCmd *cobra.Command, parentVc *viper.Viper, use, short string) (*cobra.Command, *viper.Viper)
- func NewCui() (*gocui.Gui, <-chan bool)
- func NewGenerateMarkdownCommand(parentCmd *cobra.Command, parentVc *viper.Viper) *cobra.Command
- func NewViper(envPrefix string) *viper.Viper
- func OnInterrupt(cb func())
- func OrArgs(pArgs ...cobra.PositionalArgs) cobra.PositionalArgs
- func SetEnvKeyReplacer(vc *viper.Viper, r *strings.Replacer)
- func StartCPUProfile(filename string) error
- func StartMemoryProfile(filename string) error
- func StringToStringConv(val string) (map[string]interface{}, error)
- func TermGui(g *gocui.Gui, termCh <-chan bool)
- func ValidateFlags(fs *pflag.FlagSet, flagNames ...string) error
- func ValidateFlagsWithViper(vc *viper.Viper, fs *pflag.FlagSet, flagNames ...string) error
- func ViperDecodeOptJson(c *mapstructure.DecoderConfig)
- func ZipDirectory(p string, excludes ...string) ([]byte, error)
Constants ¶
View Source
const (
FlagAnnotationCustom = "custom"
)
Variables ¶
Functions ¶
func ArgsWithDefaultErrorFunc ¶
func ArgsWithDefaultErrorFunc(arg cobra.PositionalArgs) cobra.PositionalArgs
func ArgsWithErrorFunc ¶
func ArgsWithErrorFunc(arg cobra.PositionalArgs, errFunc func(cmd *cobra.Command, err error) error) cobra.PositionalArgs
func FlagToMarkdown ¶
func GenerateMarkdown ¶
func IsDirectory ¶
func JsonPrettyCopyAndClose ¶
func JsonPrettyCopyAndClose(w io.Writer, r io.ReadCloser) error
func JsonPrettyPrintln ¶
func JsonPrettySaveFile ¶
func NewCommand ¶
func OnInterrupt ¶
func OnInterrupt(cb func())
func OrArgs ¶
func OrArgs(pArgs ...cobra.PositionalArgs) cobra.PositionalArgs
func StartCPUProfile ¶
func StartMemoryProfile ¶
func StringToStringConv ¶
func ValidateFlagsWithViper ¶
func ViperDecodeOptJson ¶
func ViperDecodeOptJson(c *mapstructure.DecoderConfig)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.