MCPcopy Index your code
hub / github.com/ddev/ddev / GetInactiveProjects

Function GetInactiveProjects

pkg/ddevapp/utils.go:396–413  ·  view source on GitHub ↗

GetInactiveProjects returns projects that are currently running

()

Source from the content-addressed store, hash-verified

394
395// GetInactiveProjects returns projects that are currently running
396func GetInactiveProjects() ([]*DdevApp, error) {
397 var inactiveApps []*DdevApp
398
399 apps, err := GetProjects(false)
400
401 if err != nil {
402 return nil, err
403 }
404
405 for _, app := range apps {
406 status, _ := app.SiteStatus()
407 if status != SiteRunning {
408 inactiveApps = append(inactiveApps, app)
409 }
410 }
411
412 return inactiveApps, nil
413}
414
415// ExtractProjectNames returns a list of names by a bunch of projects
416func ExtractProjectNames(apps []*DdevApp) []string {

Callers 4

TestGetInactiveProjectsFunction · 0.92
start.goFile · 0.92
removeInactiveHostnamesFunction · 0.92
GetProjectNamesFuncFunction · 0.85

Calls 2

GetProjectsFunction · 0.85
SiteStatusMethod · 0.80

Tested by 1

TestGetInactiveProjectsFunction · 0.74