예제 #1
0
파일: wrappers.go 프로젝트: ncdc/origin
// 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
}
예제 #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
}