|
|
@ -15,7 +15,11 @@ func (r RealRunner) Get(stdin []byte, ns string) ([]byte, error) {
|
|
|
|
|
|
|
|
|
|
|
|
// GetByKind gets a named thing by kind.
|
|
|
|
// GetByKind gets a named thing by kind.
|
|
|
|
func (r RealRunner) GetByKind(kind, name, ns string) (string, error) {
|
|
|
|
func (r RealRunner) GetByKind(kind, name, ns string) (string, error) {
|
|
|
|
args := []string{"get", kind, name}
|
|
|
|
args := []string{"get", kind}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if name != "" {
|
|
|
|
|
|
|
|
args = append([]string{name}, args...)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if ns != "" {
|
|
|
|
if ns != "" {
|
|
|
|
args = append([]string{"--namespace=" + ns}, args...)
|
|
|
|
args = append([]string{"--namespace=" + ns}, args...)
|
|
|
@ -40,7 +44,11 @@ func (r PrintRunner) Get(stdin []byte, ns string) ([]byte, error) {
|
|
|
|
|
|
|
|
|
|
|
|
// GetByKind gets a named thing by kind.
|
|
|
|
// GetByKind gets a named thing by kind.
|
|
|
|
func (r PrintRunner) GetByKind(kind, name, ns string) (string, error) {
|
|
|
|
func (r PrintRunner) GetByKind(kind, name, ns string) (string, error) {
|
|
|
|
args := []string{"get", kind, name}
|
|
|
|
args := []string{"get", kind}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if name != "" {
|
|
|
|
|
|
|
|
args = append([]string{name}, args...)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if ns != "" {
|
|
|
|
if ns != "" {
|
|
|
|
args = append([]string{"--namespace=" + ns}, args...)
|
|
|
|
args = append([]string{"--namespace=" + ns}, args...)
|
|
|
|