utrack / clay

Proto-first minimal server platform for gRPС+REST+Swagger APIs
MIT License
290 stars 37 forks source link

Add support of flag 'module' to 'goclay_out' #95

Closed zerospiel closed 3 years ago

zerospiel commented 4 years ago

The current implementation of protoc-gen-go supports module flag, that (and that flag is supported even in new APIv2 since v1.21.0). The current implementation of protoc-gen-goclay plugin has no support for module flag:

Error parsing flags: Cannot set flag module=github.com/foo/bar: no such flag -module

Using this flag helps to enhance workflow with generated files due to generation in the root directory with a relative path (i.e. github.com/foo/bar/baz/my.proto will be generated as baz/my.pb.go with --go_out=module=github.com/foo/bar).

With the support of this flag, it'll be much easier to work in modules and overall with generated files.