IsPOGO checks if a Groovy file is a Plain Old Groovy Object (contains a class definition)
(filePath string)
| 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 { |
| 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 (#!/...) |
| 63 | func (g *GroovyUtils) HasShebang(filePath string) bool { |
no outgoing calls
no test coverage detected