protobuf
protobuf copied to clipboard
Use protoc-gen-gofast when go module is on
in my project , go module is on
, the project directory is as follow:
pro-├── go.mod
├── pb
│ ├── user
│ │ ├── user.proto
│ ├── city.proto
go.mod:
module git.a.com/p1/game
user.proto:
package user;
message User{
int32 id = 1;
string name =2;
}
city.proto:
package city;
import "pb/user/user.proto";
message city {
User u = 1;
}
city.pb.go
package city
import (
...
user "pb/user"
...
)
what can i do to change the package importing from user "pb/user"
to user "git.a.com/p1/game/pb/user"
? thx.
Is there any play for tools to fully support go module
? thx.
just stumbled onto this, if you add this in your proto file it will work
option go_package = "git.a.com/p1/game/pb/user";