github.com/torfuzx/docker@v1.8.1/runconfig/parse_experimental.go (about) 1 // +build experimental 2 3 package runconfig 4 5 import flag "github.com/docker/docker/pkg/mflag" 6 7 type experimentalFlags struct { 8 flags map[string]interface{} 9 } 10 11 func attachExperimentalFlags(cmd *flag.FlagSet) *experimentalFlags { 12 flags := make(map[string]interface{}) 13 flags["publish-service"] = cmd.String([]string{"-publish-service"}, "", "Publish this container as a service") 14 return &experimentalFlags{flags: flags} 15 } 16 17 func applyExperimentalFlags(exp *experimentalFlags, config *Config, hostConfig *HostConfig) { 18 config.PublishService = *(exp.flags["publish-service"]).(*string) 19 }