diff options
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 { |
