{
for _, p := range path {
fmt.Printf("go get -u %s\n", p)
cmd := exec.Command("go", "get",.../repo.go
type Repo struct {
url string
home string
branch string
}
会调用github API,解析git文件信息..."-b", r.branch, r.url, r.Path())
cmd/kratos/internal/base/vcs_url.go
func ParseVCSUrl(repo string)...= repo.CopyTo(ctx, to, p.Path, []string{".git", ".github"});
cmd/kratos/internal/project/project.go...func generateFileContent(gen *protogen.Plugin, file *protogen.File, g *protogen.GeneratedFile) {
获取错误码和默认错误码