stack-labs / questions

任何关于Micro的问题都可以在Issue中创建
27 stars 6 forks source link

问题“proto/meta/meta.pb.go:10:2: package proto is not in GOROOT” #40

Open linghunjiushu opened 4 years ago

linghunjiushu commented 4 years ago

使用 github.com/micro/go-micro/v2 github.com/micro/protoc-gen-micro/v2

micro new --type=api xxx

在xxx目录下执行 make proto 生成的 xxx.pb.micro.go `import ( fmt "fmt" proto "github.com/golang/protobuf/proto" math "math" proto1 "proto" )

import ( context "context" client "github.com/micro/go-micro/v2/client" server "github.com/micro/go-micro/v2/server" )`

再执行 go run main.go, 报错 proto/xxx/xxx.pb.go:10:2: package proto is not in GOROOT

hb-chen commented 4 years ago

发下你的proto文件