diff options
| -rw-r--r-- | reloadRepoType.go | 2 | ||||
| -rw-r--r-- | repo.common.go | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/reloadRepoType.go b/reloadRepoType.go index 98ec339..3320a16 100644 --- a/reloadRepoType.go +++ b/reloadRepoType.go @@ -52,7 +52,7 @@ func (repo *Repo) setRepoType() { if repo.Exists(".plugin") { repo.GoInfo.GoPlugin = true } - if ok, _, _ := repo.IsProtobuf(); ok { + if ok, _, _ := repo.ScanProtobuf(); ok { repo.GoInfo.GoProtobuf = true } switch repo.goListRepoType() { diff --git a/repo.common.go b/repo.common.go index 2289eed..9e1233d 100644 --- a/repo.common.go +++ b/repo.common.go @@ -26,6 +26,10 @@ func (r *Repo) IsGoPlugin() bool { return false } +func (repo *Repo) IsProtobuf() bool { + return repo.GoInfo.GoProtobuf +} + // This returns the list of autogenerated protobuf files // it assumes any file *.pb.go is autogenerated // @@ -33,7 +37,7 @@ func (r *Repo) IsGoPlugin() bool { // these packages also use go.wit.com/apps/autogenpb // // errors() if a .proto file does not have an autogenerated .pb.go file -func (repo *Repo) IsProtobuf() (bool, []string, error) { +func (repo *Repo) ScanProtobuf() (bool, []string, error) { fullp, fullc, err := scanForProtobuf(repo.FullPath) protos := make(map[string]string) protoc := make(map[string]string) |
