Skip to content

rob-woerner/protos

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The repos https://github.com/rob-woerner/protos and https://github.com/rob-woerner/protos-use provide an example solution to the problem of sharing protobuf definitions across files, packages, and modules.

I tried various tricks before finding this one. The keys were to put the proto files in the root directory and set the output path (--go_out and --go-grpc_out) to ".".   I don't think this should be necessary, but many attempts failed on some sort of package name mismatch.

If you find a solution that allows you to put the proto files in a subdirectory, I'd love to see it.

To be a successful solution, you need to successfully run in protos:
   make
   go build ./...

and run in protos-use:
   go get all
   go build ./...

Tip o' the hat to stackoverflow user DazWilkin for invaluable suggestions.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published