HasMainMethod checks if a Groovy file contains a static void main() method
(filePath string)
| 43 | |
| 44 | // HasMainMethod checks if a Groovy file contains a static void main() method |
| 45 | func (g *GroovyUtils) HasMainMethod(filePath string) bool { |
| 46 | content, err := os.ReadFile(filePath) |
| 47 | if err != nil { |
| 48 | return false |
| 49 | } |
| 50 | return mainMethodPattern.Match(content) |
| 51 | } |
| 52 | |
| 53 | // IsPOGO checks if a Groovy file is a Plain Old Groovy Object (contains a class definition) |
| 54 | func (g *GroovyUtils) IsPOGO(filePath string) bool { |
no outgoing calls
no test coverage detected