Skip to content

Commit 483e6d5

Browse files
committed
Move experimental commands from flags to cli package.
Signed-off-by: Ross Boucher <rboucher@gmail.com>
1 parent edfcacd commit 483e6d5

File tree

1 file changed

+6
-11
lines changed

1 file changed

+6
-11
lines changed
Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,16 @@
11
// +build experimental
22

3-
package main
4-
5-
import (
6-
"sort"
7-
8-
"github.com/docker/docker/cli"
9-
)
3+
package cli
104

115
func init() {
12-
experimentalCommands := []cli.Command{
6+
experimentalCommands := []Command{
137
{"checkpoint", "Checkpoint one or more running containers"},
148
{"restore", "Restore one or more checkpointed containers"},
159
}
1610

17-
dockerCommands = append(dockerCommands, experimentalCommands...)
11+
for _, cmd := range experimentalCommands {
12+
DockerCommands[cmd.Name] = cmd
13+
}
1814

19-
//Sorting logic required here to pass Command Sort Test.
20-
sort.Sort(byName(dockerCommands))
15+
dockerCommands = append(dockerCommands, experimentalCommands...)
2116
}

0 commit comments

Comments
 (0)