Check whether a common status applies to all services
(statuses map[string]string)
| 1255 | |
| 1256 | // Check whether a common status applies to all services |
| 1257 | func (app *DdevApp) getCommonStatus(statuses map[string]string) (bool, string) { |
| 1258 | commonStatus := "" |
| 1259 | |
| 1260 | for _, status := range statuses { |
| 1261 | if commonStatus != "" && status != commonStatus { |
| 1262 | return false, "" |
| 1263 | } |
| 1264 | |
| 1265 | commonStatus = status |
| 1266 | } |
| 1267 | |
| 1268 | return true, commonStatus |
| 1269 | } |
| 1270 | |
| 1271 | // ImportFiles takes a source directory or archive and copies to the uploaded files directory of a given app. |
| 1272 | func (app *DdevApp) ImportFiles(uploadDir, importPath, extractPath string) error { |