Fix bug about where cur ns was stored in yaml

Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
This commit is contained in:
Ahmet Alp Balkan
2020-04-18 16:17:47 -07:00
parent 2915103e3d
commit fc2e1c6b08
4 changed files with 30 additions and 9 deletions

View File

@@ -8,12 +8,14 @@ import (
)
type Context struct {
Name string `yaml:"name,omitempty"`
Namespace string `yaml:"namespace,omitempty"`
Name string `yaml:"name,omitempty"`
Context struct {
Namespace string `yaml:"namespace,omitempty"`
} `yaml:"context,omitempty"`
}
func Ctx(name string) *Context { return &Context{Name: name} }
func (c *Context) Ns(ns string) *Context { c.Namespace = ns; return c }
func (c *Context) Ns(ns string) *Context { c.Context.Namespace = ns; return c }
type Kubeconfig map[string]interface{}

View File

@@ -1 +0,0 @@
package testutil