(name string, v *types.ServiceVolumeConfig)
| 920 | } |
| 921 | |
| 922 | func toBindString(name string, v *types.ServiceVolumeConfig) string { |
| 923 | access := "rw" |
| 924 | if v.ReadOnly { |
| 925 | access = "ro" |
| 926 | } |
| 927 | options := []string{access} |
| 928 | if v.Bind != nil && v.Bind.SELinux != "" { |
| 929 | options = append(options, v.Bind.SELinux) |
| 930 | } |
| 931 | if v.Bind != nil && v.Bind.Propagation != "" { |
| 932 | options = append(options, v.Bind.Propagation) |
| 933 | } |
| 934 | if v.Volume != nil && v.Volume.NoCopy { |
| 935 | options = append(options, "nocopy") |
| 936 | } |
| 937 | return fmt.Sprintf("%s:%s:%s", name, v.Target, strings.Join(options, ",")) |
| 938 | } |
| 939 | |
| 940 | func findVolumeByName(volumes types.Volumes, name string) *types.VolumeConfig { |
| 941 | for _, vol := range volumes { |
no outgoing calls
no test coverage detected