From d7cfb134748502f60bc1797cd26fcc3e4eb4b927 Mon Sep 17 00:00:00 2001 From: Albert Nigmatzianov Date: Fri, 9 Jun 2017 21:55:21 +0200 Subject: [PATCH] Update README.md --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 4dd5429..ff844d2 100644 --- a/README.md +++ b/README.md @@ -323,6 +323,10 @@ func init() { viper.SetDefault("license", "apache") } +func Execute() { + rootCmd.Execute() +} + func main() { // Don't forget to read config either from cfgFile or from home directory! if cfgFile != "" { @@ -343,7 +347,7 @@ func main() { if err := viper.ReadInConfig(); err != nil { fmt.Println("Can't read config:", err) - os.Exit(1) + os.Exit(1) } } ```