IsBeans checks if a Groovy file is a beans-style configuration
(filePath string)
| 70 | |
| 71 | // IsBeans checks if a Groovy file is a beans-style configuration |
| 72 | func (g *GroovyUtils) IsBeans(filePath string) bool { |
| 73 | content, err := os.ReadFile(filePath) |
| 74 | if err != nil { |
| 75 | return false |
| 76 | } |
| 77 | return beansPattern.Match(content) |
| 78 | } |
| 79 | |
| 80 | // isValidGroovyFile checks if a file is a valid, readable Groovy script |
| 81 | // Filters out binary files, empty files, and files with invalid content |
no outgoing calls
no test coverage detected