From 45fc9ea257d3f6bd3987858cc472c3e17f50c046 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Sun, 1 Dec 2024 22:23:38 -0600 Subject: autogenpb now completely automatic --- repo.protofiles.go | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'repo.protofiles.go') 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 +} -- cgit v1.2.3