Skip to content

Commit 61bd2eb

Browse files
committed
chore: accept .conf.example files
1 parent 8b9e759 commit 61bd2eb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ func LoadSeclang(input string) types.ConfigurationList {
8181
if err != nil {
8282
return err
8383
}
84-
if !info.IsDir() && filepath.Ext(info.Name()) == ".conf" {
84+
if ext := filepath.Ext(info.Name()); !info.IsDir() && (ext == ".conf" || (ext == ".example" && filepath.Ext(strings.TrimSuffix(info.Name(), ext)) == ".conf")) {
8585
input, err := antlr.NewFileStream(path)
8686
if err != nil {
8787
panic("Error reading file" + path)

0 commit comments

Comments
 (0)