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

Method Get

src/java/containers/container.go:98–106  ·  view source on GitHub ↗

Get returns the container whose Detect() returns the given name, or nil if not found. Used by the finalize phase to resolve a container by the name stored in config.yml.

(name string)

Source from the content-addressed store, hash-verified

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.
98func (r *Registry) Get(name string) Container {
99 for _, container := range r.containers {
100 detected, err := container.Detect()
101 if err == nil && detected == name {
102 return container
103 }
104 }
105 return nil
106}
107
108// RegisterStandardContainers registers all standard containers in the correct priority order.
109// This ensures Supply and Finalize phases use the same detection order.

Callers 1

Calls 1

DetectMethod · 0.65

Tested by

no test coverage detected