Beispiel #1
0
// NewCmdGet is a wrapper for the Kubernetes cli get command
func NewCmdGet(fullName string, f *clientcmd.Factory, out io.Writer) *cobra.Command {
	cmd := kcmd.NewCmdGet(f.Factory, out)
	cmd.Long = fmt.Sprintf(getLong, fullName)
	cmd.Example = fmt.Sprintf(getExample, fullName)
	cmd.SuggestFor = []string{"list"}
	return cmd
}
Beispiel #2
0
// NewCmdGet is a wrapper for the Kubernetes cli get command
func NewCmdGet(fullName string, f *clientcmd.Factory, out io.Writer) *cobra.Command {
	p := describe.NewHumanReadablePrinter(false, false, false, []string{})
	validArgs := p.HandledResources()

	cmd := kcmd.NewCmdGet(f.Factory, out)
	cmd.Long = getLong
	cmd.Example = fmt.Sprintf(getExample, fullName)
	cmd.ValidArgs = validArgs
	return cmd
}