MCPcopy Create free account
hub / github.com/cloudfoundry/java-buildpack / IsPOGO

Method IsPOGO

src/java/containers/groovy_utils.go:54–60  ·  view source on GitHub ↗

IsPOGO checks if a Groovy file is a Plain Old Groovy Object (contains a class definition)

(filePath string)

Source from the content-addressed store, hash-verified

52
53// IsPOGO checks if a Groovy file is a Plain Old Groovy Object (contains a class definition)
54func (g *GroovyUtils) IsPOGO(filePath string) bool {
55 content, err := os.ReadFile(filePath)
56 if err != nil {
57 return false
58 }
59 return pogoPattern.Match(content)
60}
61
62// HasShebang checks if a Groovy file has a shebang line (#!/...)
63func (g *GroovyUtils) HasShebang(filePath string) bool {

Callers 3

FindMainGroovyScriptFunction · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected