update cobra and use Tags

Signed-off-by: Victor Vieux <vieux@docker.com>
This commit is contained in:
Victor Vieux 2016-11-03 17:12:15 -07:00
parent 73d63ec5a6
commit 2ee5bbcbfa
1 changed files with 1 additions and 3 deletions

View File

@ -3,7 +3,6 @@ package main
import ( import (
"fmt" "fmt"
"os" "os"
"strings"
"github.com/Sirupsen/logrus" "github.com/Sirupsen/logrus"
"github.com/docker/docker/cli" "github.com/docker/docker/cli"
@ -134,8 +133,7 @@ func hideExperimentalFeatures(cmd *cobra.Command) {
for _, subcmd := range cmd.Commands() { for _, subcmd := range cmd.Commands() {
// hide subcommands // hide subcommands
name := strings.Split(subcmd.Use, " ")[0] if _, ok := subcmd.Tags["experimental"]; ok {
if name == "stack" || name == "deploy" || name == "checkpoint" || name == "plugin" {
subcmd.Hidden = true subcmd.Hidden = true
} }
} }