MCPcopy Index your code
hub / github.com/cloudfoundry/java-buildpack / DetectAll

Method DetectAll

src/java/containers/container.go:77–94  ·  view source on GitHub ↗

DetectAll returns all containers that can handle the application

()

Source from the content-addressed store, hash-verified

75
76// DetectAll returns all containers that can handle the application
77func (r *Registry) DetectAll() ([]Container, []string, error) {
78 var matched []Container
79 var names []string
80
81 for _, container := range r.containers {
82 name, err := container.Detect()
83 if err != nil {
84 // Propagate errors (e.g., validation failures)
85 return nil, nil, err
86 }
87 if name != "" {
88 matched = append(matched, container)
89 names = append(names, name)
90 }
91 }
92
93 return matched, names, nil
94}
95
96// Get returns the container whose Detect() returns the given name, or nil if not found.
97// Used by the finalize phase to resolve a container by the name stored in config.yml.

Callers 1

container_test.goFile · 0.45

Calls 1

DetectMethod · 0.65

Tested by

no test coverage detected