mirror of https://github.com/docker/cli.git
update cobra and use Tags
Signed-off-by: Victor Vieux <vieux@docker.com>
This commit is contained in:
parent
73d63ec5a6
commit
2ee5bbcbfa
|
@ -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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue