From b95ab734e27d33e0d8fbabf71ca990568d4e2020 Mon Sep 17 00:00:00 2001 From: Patrick Uiterwijk Date: Sun, 31 Dec 2017 11:15:56 +0100 Subject: [PATCH] Remove trailing whitespace in rootcmd (#606) Signed-off-by: Patrick Uiterwijk --- cobra/cmd/init.go | 2 +- cobra/cmd/testdata/root.go.golden | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cobra/cmd/init.go b/cobra/cmd/init.go index b2e5217..2441370 100644 --- a/cobra/cmd/init.go +++ b/cobra/cmd/init.go @@ -174,7 +174,7 @@ func Execute() { } } -func init() { {{if .viper}} +func init() { {{- if .viper}} cobra.OnInitialize(initConfig) {{end}} // Here you will define your flags and configuration settings. diff --git a/cobra/cmd/testdata/root.go.golden b/cobra/cmd/testdata/root.go.golden index a76a767..d74f4cd 100644 --- a/cobra/cmd/testdata/root.go.golden +++ b/cobra/cmd/testdata/root.go.golden @@ -49,7 +49,7 @@ func Execute() { } } -func init() { +func init() { cobra.OnInitialize(initConfig) // Here you will define your flags and configuration settings.