INNER CODE UNIT · Go
RbacGenCmd
alcideio/rbac-tool · main.go:14
func RbacGenCmd() *cobra.Command {
var rootCmd = &cobra.Command{
Use: "rbac-tool",
Short: "rbac-tool",
Long: `rbac-tool`,
}
var genBashCompletionCmd = &cobra.Command{
Use: "bash-completion",
Short: "Generate bash completion. source <(rbac-tool bash-completion)",
Long: "Generate bash completion. source <(rbac-tool bash-completion)",
Run: func(cmd *cobra.Command, args []string) {
out := new(bytes.Buffer)
_ = rootCmd.GenBashCompletion(out)
fmt.Println(out.String())
},
}