Beispiel #1
0
func NewCmdCompletion(fullName string, f *clientcmd.Factory, out io.Writer) *cobra.Command {
	cmdHelpName := fullName

	if strings.HasSuffix(fullName, "completion") {
		cmdHelpName = "openshift"
	}

	cmd := kcmd.NewCmdCompletion(f.Factory, out)
	cmd.Long = fmt.Sprintf(completionLong, cmdHelpName)
	cmd.Example = fmt.Sprintf(completionExample, cmdHelpName, cmdHelpName, cmdHelpName, cmdHelpName)
	return cmd
}
Beispiel #2
0
func NewCmdCompletion(fullName string, f *clientcmd.Factory, out io.Writer) *cobra.Command {
	cmd := kcmd.NewCmdCompletion(f.Factory, out)
	cmd.Long = completionLong
	cmd.Example = completionExample
	return cmd
}