This commit is contained in:
anqiansong
2022-03-09 19:26:35 +08:00
committed by GitHub
parent 63b7d292c1
commit 4624390e54
11 changed files with 335 additions and 131 deletions

View File

@@ -23,8 +23,11 @@ func Install(cacheDir string) (string, error) {
}
func Exists() bool {
_, err := env.LookUpProtocGenGo()
return err == nil
ver, err := Version()
if err != nil {
return false
}
return len(ver) > 0
}
// Version is used to get the version of the protoc-gen-go plugin. For older versions, protoc-gen-go does not support