From b02e1e17ec0e98c39de8a24971ccb445f74c7136 Mon Sep 17 00:00:00 2001 From: foxyriver Date: Fri, 11 Jan 2019 10:18:56 +0800 Subject: [PATCH] format help text --- cmd/kubeadm/app/cmd/reset.go | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/cmd/kubeadm/app/cmd/reset.go b/cmd/kubeadm/app/cmd/reset.go index 93545b18658..e8c9986e24c 100644 --- a/cmd/kubeadm/app/cmd/reset.go +++ b/cmd/kubeadm/app/cmd/reset.go @@ -26,6 +26,7 @@ import ( "strings" "github.com/pkg/errors" + "github.com/renstrom/dedent" "github.com/spf13/cobra" "k8s.io/apimachinery/pkg/util/sets" clientset "k8s.io/client-go/kubernetes" @@ -186,16 +187,16 @@ func (r *Reset) Run(out io.Writer, client clientset.Interface) error { resetConfigDir(kubeadmconstants.KubernetesDir, r.certsDir) // Output help text instructing user how to remove iptables rules - msg := ` -The reset process does not reset or clean up iptables rules or IPVS tables. -If you wish to reset iptables, you must do so manually. -For example: -iptables -F && iptables -t nat -F && iptables -t mangle -F && iptables -X + msg := dedent.Dedent(` + The reset process does not reset or clean up iptables rules or IPVS tables. + If you wish to reset iptables, you must do so manually. + For example: + iptables -F && iptables -t nat -F && iptables -t mangle -F && iptables -X -If your cluster was setup to utilize IPVS, run ipvsadm --clear (or similar) -to reset your system's IPVS tables. + If your cluster was setup to utilize IPVS, run ipvsadm --clear (or similar) + to reset your system's IPVS tables. -` + `) fmt.Print(msg) return nil