Selaa lähdekoodia

Merge pull request #15116 from ibuildthecloud/devices

Revert change to make ParseDevice unexported
Tibor Vass 10 vuotta sitten
vanhempi
commit
2a593bea12
1 muutettua tiedostoa jossa 3 lisäystä ja 2 poistoa
  1. 3 2
      runconfig/parse.go

+ 3 - 2
runconfig/parse.go

@@ -283,7 +283,7 @@ func Parse(cmd *flag.FlagSet, args []string) (*Config, *HostConfig, *flag.FlagSe
 	// parse device mappings
 	// parse device mappings
 	deviceMappings := []DeviceMapping{}
 	deviceMappings := []DeviceMapping{}
 	for _, device := range flDevices.GetAll() {
 	for _, device := range flDevices.GetAll() {
-		deviceMapping, err := parseDevice(device)
+		deviceMapping, err := ParseDevice(device)
 		if err != nil {
 		if err != nil {
 			return nil, nil, cmd, err
 			return nil, nil, cmd, err
 		}
 		}
@@ -487,7 +487,8 @@ func parseKeyValueOpts(opts opts.ListOpts) ([]KeyValuePair, error) {
 	return out, nil
 	return out, nil
 }
 }
 
 
-func parseDevice(device string) (DeviceMapping, error) {
+// ParseDevice parses a device mapping string to a DeviceMapping struct
+func ParseDevice(device string) (DeviceMapping, error) {
 	src := ""
 	src := ""
 	dst := ""
 	dst := ""
 	permissions := "rwm"
 	permissions := "rwm"