(p types.Project, s types.ServiceConfig, m map[string]mount.Mount)
| 1048 | } |
| 1049 | |
| 1050 | func fillBindMounts(p types.Project, s types.ServiceConfig, m map[string]mount.Mount) (map[string]mount.Mount, error) { |
| 1051 | for _, v := range s.Volumes { |
| 1052 | bindMount, err := buildMount(p, v) |
| 1053 | if err != nil { |
| 1054 | return nil, err |
| 1055 | } |
| 1056 | m[bindMount.Target] = bindMount |
| 1057 | } |
| 1058 | |
| 1059 | secrets, err := buildContainerSecretMounts(p, s) |
| 1060 | if err != nil { |
| 1061 | return nil, err |
| 1062 | } |
| 1063 | for _, s := range secrets { |
| 1064 | if _, found := m[s.Target]; found { |
| 1065 | continue |
| 1066 | } |
| 1067 | m[s.Target] = s |
| 1068 | } |
| 1069 | |
| 1070 | configs, err := buildContainerConfigMounts(p, s) |
| 1071 | if err != nil { |
| 1072 | return nil, err |
| 1073 | } |
| 1074 | for _, c := range configs { |
| 1075 | if _, found := m[c.Target]; found { |
| 1076 | continue |
| 1077 | } |
| 1078 | m[c.Target] = c |
| 1079 | } |
| 1080 | return m, nil |
| 1081 | } |
| 1082 | |
| 1083 | func buildContainerConfigMounts(p types.Project, s types.ServiceConfig) ([]mount.Mount, error) { |
| 1084 | mounts := map[string]mount.Mount{} |
no test coverage detected