diff options
Diffstat (limited to 'repo.protofiles.go')
| -rw-r--r-- | repo.protofiles.go | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/repo.protofiles.go b/repo.protofiles.go index 2087830..eff0d82 100644 --- a/repo.protofiles.go +++ b/repo.protofiles.go @@ -80,3 +80,22 @@ func scanForProtobuf(srcDir string) ([]string, []string, error) { return protofiles, compiled, err } + +func (repo *Repo) GetProtoFiles() ([]string, error) { + var protofiles []string + err := filepath.Walk(repo.GetFullPath(), func(path string, info os.FileInfo, err error) error { + if err != nil { + log.Log(GITPBWARN, "Error accessing path:", path, err) + return err + } + + if strings.HasSuffix(path, ".proto") { + // + protofiles = append(protofiles, path) + } + + return nil + }) + + return protofiles, err +} |
