From c6c44e6fdcc30161c7f4480754da7230d01c06e3 Mon Sep 17 00:00:00 2001 From: Bilal Amarni Date: Thu, 1 Mar 2018 19:15:57 +0100 Subject: [PATCH] Update the bash completion example for kubectl (#645) --- bash_completions.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/bash_completions.md b/bash_completions.md index 691a04e1..8d01f456 100644 --- a/bash_completions.md +++ b/bash_completions.md @@ -6,15 +6,16 @@ Generating bash completions from a cobra command is incredibly easy. An actual p package main import ( - "io/ioutil" - "os" + "io/ioutil" + "os" - "github.com/GoogleCloudPlatform/kubernetes/pkg/kubectl/cmd" + "k8s.io/kubernetes/pkg/kubectl/cmd" + "k8s.io/kubernetes/pkg/kubectl/cmd/util" ) func main() { - kubectl := cmd.NewFactory(nil).NewKubectlCommand(os.Stdin, ioutil.Discard, ioutil.Discard) - kubectl.GenBashCompletionFile("out.sh") + kubectl := cmd.NewKubectlCommand(util.NewFactory(nil), os.Stdin, ioutil.Discard, ioutil.Discard) + kubectl.GenBashCompletionFile("out.sh") } ```