mirror of
https://github.com/ahmetb/kubectx.git
synced 2025-09-16 07:48:24 +00:00
Load namespaces using client-go
Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
This commit is contained in:
@@ -55,6 +55,10 @@ func (k *Kubeconfig) Parse() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (k *Kubeconfig) Bytes() ([]byte, error) {
|
||||
return yaml.Marshal(k.rootNode)
|
||||
}
|
||||
|
||||
func (k *Kubeconfig) Save() error {
|
||||
if err := k.f.Reset(); err != nil {
|
||||
return errors.Wrap(err, "failed to reset file")
|
||||
|
Reference in New Issue
Block a user