summaryrefslogtreecommitdiff
path: root/unix.go
diff options
context:
space:
mode:
Diffstat (limited to 'unix.go')
-rw-r--r--unix.go19
1 files changed, 19 insertions, 0 deletions
diff --git a/unix.go b/unix.go
index 1929d24..6d90676 100644
--- a/unix.go
+++ b/unix.go
@@ -466,3 +466,22 @@ func ScanGitDirectories(srcDir string) []string {
return all
}
+
+func ScanForProtobuf(srcDir string) ([]string, error) {
+ var protofiles []string
+ err := filepath.Walk(srcDir, func(path string, info os.FileInfo, err error) error {
+ if err != nil {
+ log.Log(REPOWARN, "Error accessing path:", path, err)
+ return err
+ }
+
+ if strings.HasSuffix(path, ".proto") {
+ //
+ protofiles = append(protofiles, path)
+ }
+
+ return nil
+ })
+
+ return protofiles, err
+}