-
Notifications
You must be signed in to change notification settings - Fork 327
Closed
Description
Perhaps the comment in this line of code describes the issue best:
twirp/protoc-gen-twirp/go_naming.go
Line 34 in ead44db
// The presence of a slash implies there's an import path. |
An import path may not actually have a slash in it. For example if you define a vanity import such as "go.mycompany.com" and then define your protobuf file at the root of the module as such:
syntax = "proto3";
package mycompany;
option go_package = "go.mycompany.com;mycompany";
...
Twirp will end up generating the following Go package declaration:
package go_mycompany_com_mycompany
...
This is clearly incorrect. Twirp should instead see if there's a semi-colon in the go_package option and then return the left hand side as the import path and the right hand side as the package name.
Metadata
Metadata
Assignees
Labels
No labels