diff options
| author | Jeff Carr <[email protected]> | 2024-11-29 23:18:46 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-11-29 23:18:46 -0600 |
| commit | b52c3c426af45ae45ee5d862834c9353bb0e5fb5 (patch) | |
| tree | f6f6c8d2668cd418f936442c256aa412cb271d72 /common.go | |
| parent | c25e4dd406072793cab0589be6620bf6bc43ede5 (diff) | |
start moving things to gitpbv0.22.20
Diffstat (limited to 'common.go')
| -rw-r--r-- | common.go | 35 |
1 files changed, 0 insertions, 35 deletions
@@ -1,9 +1,7 @@ package repostatus import ( - "errors" "os" - "path/filepath" "strings" "unicode" @@ -61,39 +59,6 @@ func (rs *RepoStatus) IsPrimitive() bool { return false } -func (rs *RepoStatus) IsProtobuf() (bool, []string, error) { - fullp, fullc, err := ScanForProtobuf(rs.Path()) - protos := make(map[string]string) - protoc := make(map[string]string) - var anyfound bool = false - var allc []string - for _, s := range fullp { - filebase := filepath.Base(s) - name := strings.TrimSuffix(filebase, ".proto") - anyfound = true - protos[name] = s - } - for pname, _ := range protos { - var found bool = false - for _, s := range fullc { - cfilebase := filepath.Base(s) - cname := strings.TrimSuffix(cfilebase, ".pb.go") - protoc[cname] = s - if cname == pname { - found = true - allc = append(allc, cfilebase) - } - } - if found { - // log.Info("found ok") - } else { - log.Info("missing compiled proto file:", pname+"pb.go") - err = errors.New("compiled file " + pname + ".pb.go missing") - } - } - return anyfound, allc, err -} - // returns the filesystem path to the repo func (rs *RepoStatus) Path() string { if rs == nil { |
