Browse code

Merge pull request #12762 from ibuildthecloud/export-restart-parse

Expose ParseRestartPolicy

Brian Goff authored on 2015/04/25 05:30:18
Showing 1 changed files
... ...
@@ -277,7 +277,7 @@ func Parse(cmd *flag.FlagSet, args []string) (*Config, *HostConfig, *flag.FlagSe
277 277
 		return nil, nil, cmd, fmt.Errorf("--net: invalid net mode: %v", err)
278 278
 	}
279 279
 
280
-	restartPolicy, err := parseRestartPolicy(*flRestartPolicy)
280
+	restartPolicy, err := ParseRestartPolicy(*flRestartPolicy)
281 281
 	if err != nil {
282 282
 		return nil, nil, cmd, err
283 283
 	}
... ...
@@ -374,8 +374,8 @@ func convertKVStringsToMap(values []string) map[string]string {
374 374
 	return result
375 375
 }
376 376
 
377
-// parseRestartPolicy returns the parsed policy or an error indicating what is incorrect
378
-func parseRestartPolicy(policy string) (RestartPolicy, error) {
377
+// ParseRestartPolicy returns the parsed policy or an error indicating what is incorrect
378
+func ParseRestartPolicy(policy string) (RestartPolicy, error) {
379 379
 	p := RestartPolicy{}
380 380
 
381 381
 	if policy == "" {