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:
@ -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
|
||||
}
|
||||
|
||||
@ -1,8 +0,0 @@
|
||||
// +build !experimental
|
||||
|
||||
package container
|
||||
|
||||
import "github.com/spf13/pflag"
|
||||
|
||||
func addExperimentalStartFlags(flags *pflag.FlagSet, opts *startOptions) {
|
||||
}
|
||||
@ -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")
|
||||
}
|
||||
Reference in New Issue
Block a user