()
| 8 | ) |
| 9 | |
| 10 | func main() { |
| 11 | // create a new factory |
| 12 | f := factory.DefaultFactory() |
| 13 | |
| 14 | // build the root command |
| 15 | rootCmd := cmd.BuildRoot(f, true) |
| 16 | |
| 17 | // generate the completions |
| 18 | err := rootCmd.GenBashCompletionFile("completion/bash.sh") |
| 19 | if err != nil { |
| 20 | fmt.Println(err) |
| 21 | } |
| 22 | |
| 23 | err = rootCmd.GenZshCompletionFile("completion/zsh-completion") |
| 24 | if err != nil { |
| 25 | fmt.Println(err) |
| 26 | } |
| 27 | |
| 28 | err = rootCmd.GenPowerShellCompletionFile("completion/powershell.ps") |
| 29 | if err != nil { |
| 30 | fmt.Println(err) |
| 31 | } |
| 32 | |
| 33 | err = rootCmd.GenFishCompletionFile("completion/fish.fish", true) |
| 34 | if err != nil { |
| 35 | fmt.Println(err) |
| 36 | } |
| 37 | |
| 38 | } |
nothing calls this directly
no test coverage detected