-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move experimental commands from flags to cli package.
Signed-off-by: Ross Boucher <[email protected]>
- Loading branch information
Showing
1 changed file
with
6 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,16 @@ | ||
// +build experimental | ||
|
||
package main | ||
|
||
import ( | ||
"sort" | ||
|
||
"github.com/docker/docker/cli" | ||
) | ||
package cli | ||
|
||
func init() { | ||
experimentalCommands := []cli.Command{ | ||
experimentalCommands := []Command{ | ||
{"checkpoint", "Checkpoint one or more running containers"}, | ||
{"restore", "Restore one or more checkpointed containers"}, | ||
} | ||
|
||
dockerCommands = append(dockerCommands, experimentalCommands...) | ||
for _, cmd := range experimentalCommands { | ||
DockerCommands[cmd.Name] = cmd | ||
} | ||
|
||
//Sorting logic required here to pass Command Sort Test. | ||
sort.Sort(byName(dockerCommands)) | ||
dockerCommands = append(dockerCommands, experimentalCommands...) | ||
} |