Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var CompletionCmd = &cobra.Command{ Use: "completion [bash|zsh|fish|powershell]", Short: "Generate completion script", Long: `To load completions: Bash: $ source <(yourprogram completion bash) # To load completions for each session, execute once: # Linux: $ yourprogram completion bash > /etc/bash_completion.d/yourprogram # macOS: $ yourprogram completion bash > /usr/local/etc/bash_completion.d/yourprogram Zsh: # If shell completion is not already enabled in your environment, # you will need to enable it. You can execute the following once: $ echo "autoload -U compinit; compinit" >> ~/.zshrc # To load completions for each session, execute once: $ yourprogram completion zsh > "${fpath[1]}/_yourprogram" # You will need to start a new shell for this setup to take effect. fish: $ yourprogram completion fish | source # To load completions for each session, execute once: $ yourprogram completion fish > ~/.config/fish/completions/yourprogram.fish PowerShell: PS> yourprogram completion powershell | Out-String | Invoke-Expression # To load completions for every new session, run: PS> yourprogram completion powershell > yourprogram.ps1 # and source this file from your PowerShell profile. `, DisableFlagsInUseLine: true, ValidArgs: []string{"bash", "zsh", "fish", "powershell"}, Args: cobra.ExactValidArgs(1), Run: func(cmd *cobra.Command, args []string) { switch args[0] { case "bash": cmd.Root().GenBashCompletion(os.Stdout) case "zsh": cmd.Root().GenZshCompletion(os.Stdout) case "fish": cmd.Root().GenFishCompletion(os.Stdout, true) case "powershell": cmd.Root().GenPowerShellCompletionWithDesc(os.Stdout) } }, }
CompletionCmd is not really working for now. Would be nice if this actually worked.
Functions ¶
Types ¶
type ErrorHandler ¶
type ErrorHandler struct {
// contains filtered or unexported fields
}
ErrorHandler handles errors
func (ErrorHandler) HandleError ¶
func (eh ErrorHandler) HandleError(step string, err error)
HandleError handles the given error
func (ErrorHandler) HandleErrorWithOutput ¶ added in v0.1.9
func (eh ErrorHandler) HandleErrorWithOutput(step string, err error, output string)
HandleErrorWithOutput handles the given error and prints output
func (ErrorHandler) PrintError ¶ added in v0.1.7
func (eh ErrorHandler) PrintError(step string, err error)
PrintError prints the error, no exit
func (ErrorHandler) PrintErrorWithOutput ¶ added in v0.1.9
func (eh ErrorHandler) PrintErrorWithOutput(step string, err error, output string)
PrintErrorWithOutput prints the given error and output
type SemanticVersion ¶ added in v0.1.7
SemanticVersion is a struct for semantic version
func NewSemanticVersion ¶ added in v0.1.7
func NewSemanticVersion(version string) (SemanticVersion, error)
NewSemanticVersion creates a new instance of semantic version
func (SemanticVersion) String ¶ added in v0.1.7
func (sv SemanticVersion) String() string
Source Files ¶
- add.go
- add_user.go
- after.go
- after_docker_build.go
- backup.go
- backup_db_schema.go
- before.go
- before_docker_build.go
- completion.go
- create.go
- create_dbuser.go
- create_platform_schema.go
- delete.go
- delete_gitea_user.go
- delete_images.go
- delete_stack.go
- describe.go
- describe_user.go
- disable.go
- disable_pihole.go
- drop.go
- drop_dbuser.go
- drop_platform_schema.go
- enable.go
- enable_pihole.go
- list.go
- list_board.go
- list_dbuser.go
- list_panels.go
- list_repos.go
- list_runtime_installs.go
- list_user.go
- next.go
- next_tag.go
- remove.go
- remove_user.go
- restore.go
- restore_db_schema.go
- root.go
- run.go
- run_jenkins_job.go
- send.go
- send_email.go
- show.go
- show_graph.go
- ssh.go
- update.go
- update_codeserver.go
- version.go
Click to show internal directories.
Click to hide internal directories.