You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ro...@apache.org on 2018/04/25 14:57:12 UTC

[cloudstack-cloudmonkey] 04/06: help: don't display the 'fake' filter option in api help doc

This is an automated email from the ASF dual-hosted git repository.

rohit pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cloudstack-cloudmonkey.git

commit 9476afa87d8d6e681cebad52742a6409f176e344
Author: Rohit Yadav <ro...@apache.org>
AuthorDate: Sun Apr 22 20:59:05 2018 +0530

    help: don't display the 'fake' filter option in api help doc
    
    Signed-off-by: Rohit Yadav <ro...@apache.org>
---
 cmd/help.go      | 5 +++++
 config/config.go | 2 --
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/cmd/help.go b/cmd/help.go
index d027510..24f654b 100644
--- a/cmd/help.go
+++ b/cmd/help.go
@@ -21,6 +21,8 @@ import (
 	"errors"
 	"fmt"
 	"strings"
+
+	"cloudmonkey/config"
 )
 
 var helpCommand *Command
@@ -56,6 +58,9 @@ func init() {
 				fmt.Printf("%-24s %-8s %s\n", "==========", "====", "===========")
 			}
 			for _, arg := range api.Args {
+				if arg.Type == config.FAKE {
+					continue
+				}
 				fmt.Printf("\033[36m%-24s\033[0m \033[32m%-8s\033[0m ", strings.Replace(arg.Name, "=", "", -1), arg.Type)
 				info := []rune(arg.Description)
 				for i, r := range info {
diff --git a/config/config.go b/config/config.go
index 429fd4c..16bda15 100644
--- a/config/config.go
+++ b/config/config.go
@@ -218,8 +218,6 @@ func (c *Config) UpdateConfig(key string, value string) {
 		c.ActiveProfile.SecretKey = value
 	case "verifycert":
 		c.ActiveProfile.VerifyCert = value == "true"
-	default:
-		return
 	}
 
 	reloadConfig(c)

-- 
To stop receiving notification emails like this one, please contact
rohit@apache.org.