diff --git a/cmd/root.go b/cmd/root.go index 34bc2cd..e5fe33c 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -133,8 +133,9 @@ func readFileTree(path string) []Comment { return err } - // Check if file has .go extension - if filepath.Ext(p) == ".go" { + // Check if file has a valid extension + ext := filepath.Ext(p) + if ext == ".go" || ext == ".rs" || ext == ".java" || ext == ".c"{ // Read the file and check for comments file, err := os.Open(filepath.Join(path, p)) if err != nil {