HasShebang checks if a Groovy file has a shebang line (#!/...)
(filePath string)
| 61 | |
| 62 | // HasShebang checks if a Groovy file has a shebang line (#!/...) |
| 63 | func (g *GroovyUtils) HasShebang(filePath string) bool { |
| 64 | content, err := os.ReadFile(filePath) |
| 65 | if err != nil { |
| 66 | return false |
| 67 | } |
| 68 | return shebangPattern.Match(content) |
| 69 | } |
| 70 | |
| 71 | // IsBeans checks if a Groovy file is a beans-style configuration |
| 72 | func (g *GroovyUtils) IsBeans(filePath string) bool { |
no outgoing calls
no test coverage detected