From 2ee5bbcbfa9c3b1da212f4523c95f2b54e9c1e0c Mon Sep 17 00:00:00 2001 From: Victor Vieux Date: Thu, 3 Nov 2016 17:12:15 -0700 Subject: [PATCH] update cobra and use Tags Signed-off-by: Victor Vieux --- docker.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/docker.go b/docker.go index 3b6e7f8633..65568e1e61 100644 --- a/docker.go +++ b/docker.go @@ -3,7 +3,6 @@ package main import ( "fmt" "os" - "strings" "github.com/Sirupsen/logrus" "github.com/docker/docker/cli" @@ -134,8 +133,7 @@ func hideExperimentalFeatures(cmd *cobra.Command) { for _, subcmd := range cmd.Commands() { // hide subcommands - name := strings.Split(subcmd.Use, " ")[0] - if name == "stack" || name == "deploy" || name == "checkpoint" || name == "plugin" { + if _, ok := subcmd.Tags["experimental"]; ok { subcmd.Hidden = true } }