Skip to content

Commit 86e2a06

Browse files
authored
Merge pull request #6296 from thaJeztah/cli_rm_deprecated_utils
cli: remove deprecated VisitAll, DisableFlagsInUseLine utilities
2 parents c3170f1 + f9777d2 commit 86e2a06

File tree

1 file changed

+0
-25
lines changed

1 file changed

+0
-25
lines changed

cli/cobra.go

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -166,31 +166,6 @@ func (tcmd *TopLevelCommand) Initialize(ops ...command.CLIOption) error {
166166
return tcmd.dockerCli.Initialize(tcmd.opts, ops...)
167167
}
168168

169-
// VisitAll will traverse all commands from the root.
170-
//
171-
// Deprecated: this utility was only used internally and will be removed in the next release.
172-
func VisitAll(root *cobra.Command, fn func(*cobra.Command)) {
173-
visitAll(root, fn)
174-
}
175-
176-
func visitAll(root *cobra.Command, fn func(*cobra.Command)) {
177-
for _, cmd := range root.Commands() {
178-
visitAll(cmd, fn)
179-
}
180-
fn(root)
181-
}
182-
183-
// DisableFlagsInUseLine sets the DisableFlagsInUseLine flag on all
184-
// commands within the tree rooted at cmd.
185-
//
186-
// Deprecated: this utility was only used internally and will be removed in the next release.
187-
func DisableFlagsInUseLine(cmd *cobra.Command) {
188-
visitAll(cmd, func(ccmd *cobra.Command) {
189-
// do not add a `[flags]` to the end of the usage line.
190-
ccmd.DisableFlagsInUseLine = true
191-
})
192-
}
193-
194169
var helpCommand = &cobra.Command{
195170
Use: "help [command]",
196171
Short: "Help about the command",

0 commit comments

Comments
 (0)