Goctl rpc patch (#117)
* remove mock generation * add: proto project import * update document * remove mock generation * add: proto project import * update document * remove NL * update document * optimize code * add test * add test
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package project
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"os/exec"
|
||||
@@ -38,18 +39,18 @@ type (
|
||||
func Prepare(projectDir string, checkGrpcEnv bool) (*Project, error) {
|
||||
_, err := exec.LookPath(constGo)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
return nil, fmt.Errorf("please install go first,reference documents:「https://golang.org/doc/install」")
|
||||
}
|
||||
|
||||
if checkGrpcEnv {
|
||||
_, err = exec.LookPath(constProtoC)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
return nil, fmt.Errorf("please install protoc first,reference documents:「https://github.com/golang/protobuf」")
|
||||
}
|
||||
|
||||
_, err = exec.LookPath(constProtoCGenGo)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
return nil, fmt.Errorf("please install plugin protoc-gen-go first,reference documents:「https://github.com/golang/protobuf」")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user