Make experimental a runtime flag

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
Upstream-commit: 7781a1bf0fef748877326632b88e92fbf3c90daa
Component: engine
This commit is contained in:
Kenfe-Mickael Laventure
2016-10-06 07:09:54 -07:00
parent c42c998198
commit 9a299b360f
112 changed files with 782 additions and 979 deletions

View File

@ -44,7 +44,9 @@ func NewStartCommand(dockerCli *command.DockerCli) *cobra.Command {
flags.BoolVarP(&opts.openStdin, "interactive", "i", false, "Attach container's STDIN")
flags.StringVar(&opts.detachKeys, "detach-keys", "", "Override the key sequence for detaching a container")
addExperimentalStartFlags(flags, &opts)
if dockerCli.HasExperimental() {
flags.StringVar(&opts.checkpoint, "checkpoint", "", "Restore from this checkpoint")
}
return cmd
}

View File

@ -1,8 +0,0 @@
// +build !experimental
package container
import "github.com/spf13/pflag"
func addExperimentalStartFlags(flags *pflag.FlagSet, opts *startOptions) {
}

View File

@ -1,9 +0,0 @@
// +build experimental
package container
import "github.com/spf13/pflag"
func addExperimentalStartFlags(flags *pflag.FlagSet, opts *startOptions) {
flags.StringVar(&opts.checkpoint, "checkpoint", "", "Restore from this checkpoint")
}