diff options
| author | Jeff Carr <[email protected]> | 2024-12-01 22:23:38 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-12-01 22:23:38 -0600 |
| commit | 45fc9ea257d3f6bd3987858cc472c3e17f50c046 (patch) | |
| tree | 9ea0823baf600c085ead565b04ff3866726da117 /repo.protofiles.go | |
| parent | 2ebdd32040635ac84d173ebb315dc65b35af2b57 (diff) | |
autogenpb now completely automatic
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 +} |
