Documentation
¶
Overview ¶
Copyright © 2024 Zander Hill <zander@xargs.io>
Copyright © 2024 Zander Hill <zander@xargs.io>
Copyright © 2024 Zander Hill <zander@xargs.io>
Copyright © 2024 Zander Hill <zander@xargs.io>
Copyright © 2024 Zander Hill <zander@xargs.io>
Index ¶
- Variables
- func ExecRunE(cmd *cobra.Command, args []string) error
- func Execute()
- func ReplaceNameWithExecutableName(str string) string
- func ValidArgsFunctionForScripts(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)
- type Config
- type RenameWriter
- type Script
- func (s *Script) HasCompletions() bool
- func (s *Script) Help() string
- func (s *Script) IsDir() bool
- func (s *Script) IsExecutable() bool
- func (s *Script) PathSegments() []string
- func (s *Script) PathWithoutRoot() string
- func (s *Script) PrintHelp()
- func (s *Script) PrintUsage()
- func (s *Script) Usage() string
- type ScriptTemplate
Constants ¶
This section is empty.
Variables ¶
View Source
var UsageKey = "USAGE: "
Functions ¶
func Execute ¶
func Execute()
Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.
Types ¶
type Config ¶
type Config struct { }
func (*Config) EnvVarOrViperValue ¶
func (*Config) ExecutableName ¶
type RenameWriter ¶
type RenameWriter struct {
// contains filtered or unexported fields
}
type Script ¶
type Script struct {
// contains filtered or unexported fields
}
func (*Script) HasCompletions ¶
func (*Script) IsExecutable ¶
func (*Script) PathSegments ¶
func (*Script) PathWithoutRoot ¶
func (*Script) PrintHelp ¶
func (s *Script) PrintHelp()
PrintHelp prints the full help text for the script Help is inclusive of Usage and does not strip out the script name or $0 TODO: consider stripping out leading comment characters such as #, //, etc
func (*Script) PrintUsage ¶
func (s *Script) PrintUsage()
type ScriptTemplate ¶
Click to show internal directories.
Click to hide internal directories.