Golang Protobuf imports "."

922 views
Skip to first unread message

Roger Alsing

unread,
Apr 22, 2016, 4:34:43 PM4/22/16
to Protocol Buffers
Is there some way to make the protoc generator generate correct Golang imports?

Im having trouble importing other proto files and generating Go code.

If I run the compiler using
protoc --go_out=. --proto_path=path\to\my\includes foo.proto

the generated code will contain a  ´import "."´ 


package messages

import fmt "fmt"
import math "math"
import myimport "."   //<---- here

which is not correct, that needs to be pointing to the generated code in the source folder of the imported proto.
So I guess my question really is how you make the Go generator know where the imported source code exists.

Is there anything I can do?

//Roger



Feng Xiao

unread,
Apr 22, 2016, 4:40:00 PM4/22/16
to Roger Alsing, Protocol Buffers
Please check the Go documentation for this (the Parameters section):


 

Is there anything I can do?

//Roger



--
You received this message because you are subscribed to the Google Groups "Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to protobuf+u...@googlegroups.com.
To post to this group, send email to prot...@googlegroups.com.
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages