MCPcopy Create free account
hub / github.com/GoogleCloudPlatform/buildpacks / filterExecutables

Function filterExecutables

pkg/java/java.go:99–109  ·  view source on GitHub ↗
(ctx *gcp.Context, jars []string)

Source from the content-addressed store, hash-verified

97}
98
99func filterExecutables(ctx *gcp.Context, jars []string) []string {
100 var executables []string
101 for _, jar := range jars {
102 if main, err := FindManifestValueFromJar(jar, mainClassKey); err != nil {
103 ctx.Warnf("Failed to inspect %s, skipping: %v.", jar, err)
104 } else if main != "" {
105 executables = append(executables, jar)
106 }
107 }
108 return executables
109}
110
111// MainManifestEntry returns the Main-Class manifest entry of the jar at the given filepath,
112// or an empty string if the entry does not exist.

Callers 1

ExecutableJarFunction · 0.85

Calls 2

FindManifestValueFromJarFunction · 0.85
WarnfMethod · 0.80

Tested by

no test coverage detected